#include <cstdio>
// 全局数组,short 类型节省内存
const int MAX_N = 1005;
const int MAX_M = 1005;
short matrix[MAX_N][MAX_M];
// 快速读取整数
inline int readInt() {
int x = 0, f = 1;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-') f = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9') {
x = x * 10 + ch - '0';
ch = getchar();
}
return x * f;
}
int main() {
int n = readInt();
int m = readInt();
}