#include<bits/stdc++.h>
using namespace std;
const int INF = 1e18 + 10;
const int MAX = 510;
long long arr[MAX];
bool vis[MAX];
long long value(int r, int c);
pair<int, int> find_locmin_point(int N, int M){
	long long prev = INF;
	for(int i = 1; i <= M; i++){
		long long curr, sled;
		if(vis[i]){
			curr = arr[i];
		}else{
			curr = value(1, i);
		}
		if(vis[i + 1] && i + 1 <= N){
			sled = arr[i + 1];
		}else{
			sled = value(1, i + 1);
		}
		if(i + 1 > N) sled = INF;
		if(prev > curr && sled > curr){
			return make_pair(1, i);
		}
		prev = curr;
	}
	return make_pair(0, 0);
}
