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