#include "locmin.h"
#include "bits/stdc++.h"
using namespace std;
const long long INF = 1e18;
pair < int, int> find_locmin_point(int n, int m){
  int l = 1, r = m;
  while(r >= l){
  	int mid = l + (r - l) / 2;
  	long long cur = value(1, mid);
  	long long L = (mid > 1) ? value(1, mid - 1) : INF;
  	long long R = (mid < m) ? value(1, mid + 1) : INF;
  	if(cur < L && cur < R){
  		return {1, mid};
		}
		else if(L < cur){
			r = mid - 1;
		}
		else {
			l = mid + 1;
		}
	}
	return {1, 1};
}