#include <bits/stdc++.h>
//#define int long long
#define F first
#define S second
#define pii pair <int, int>
#define ins insert
#define pb push_back
#define ld long double
using namespace std;
int a[501];
long long value(int r, int c);
int bl(int x, int m)
{
    if (x == m) return 0;
    if (!a[x]) a[x] = value(1, x);
    if (!a[x + 1]) a[x + 1] = value(1, x + 1);
    return a[x] > a[x + 1];
}
pii find_locmin_poin(int n, int m)
{
    if (n == 1)
    {
        int l = 1, r = m, ans = 1;
        while (l <= r)
        {
            int mid = (l + r) / 2;
            if (bl(mid, m))
            {
                l = mid + 1;
                ans = mid + 1;
            }
            else
            {
                r = mid - 1;
                ans = mid;
            }
        }
        return {1, ans};
    }
    return {1, 1};
}
