#include using namespace std; int main() { int a[1000][1000],n,m; cin>>n>>m; for(int i=0;i>a[i][j]; for(int j=0;j