#include #include #include #include #include #include #include using namespace std; #define int long long #define endl "\n" const long long INF = (long long)1e18; const long long MOD = 1'000'000'007; string yn(bool f){return f?"Yes":"No";} string YN(bool f){return f?"YES":"NO";} int N, K; bool check(int num){ // cout<> ans(MAX, vector(MAX, false)); vector conh(MAX), conw(MAX); cin>>N>>K; for(int i = 1; ; i++){ if(check(i)){ M = i; break; } } for(int i = 0; i < M; i++){ for(int j = 0; j < K && j < M; j++){ ans[i][(i+j)%M] = true; } } cout<