#include #include #include using namespace std; using namespace atcoder; using mint = modint1000000007; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000001 int main(){ int h,w; cin>>h>>w; vector a(h,vector(w,0)); rep(i,h){ rep(j,w){ if(a[i][j]==1)continue; if(i+1=3&&w>=3&&h%2==1&&w%2==1){ a.assign(h,vector(w,1)); if(h>=w){ rep(i,h){ if(i