#include<iostream>
using namespace std;
const int NMAX = 500;
long long int value(int row, int col);
const long long INF = 1e18 + 5;
pair<int, int> find_locmin_point(int n, int m)
{
    int st = 0, dr = m + 1;
    while(dr - st > 1)
    {
        int mid = (st + dr) >> 1;
        if(value(1, mid) < ((mid == m) ? (INF) : value(1, mid + 1)))
            dr = mid;
        else
            st = mid;
    }
    return {1, dr};
}