#include<bits/stdc++.h>
using namespace std;
int mp[40000][40000],nmp[40000][40000];
void cmp(){
	
}
int main(){
	int n,m;
	cin>>n>>m;
	
}