#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include using namespace std; int G[1010][1010]; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int h,w; cin>>h>>w; if(h%2==0 && w%2==0){ rep(i,h) rep(j,w) G[i][j]=1; } else if(h%2==0){ rep(i,h) rep(j,w-1) G[i][j]=1; } else if(w%2==0){ rep(i,h-1) rep(j,w) G[i][j]=1; } else{ auto dfs=[&](auto dfs,int x,int y,int rx,int ry){ if(rx==1 || ry==1) return; G[x][y]=1,G[x+1][y+1]=1; for(int j=0;j