#include using namespace std; using ll=long long; #define rep(i,n) for(int i=0;i=0;i--) #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(),v.rend() template bool chmax(T &a, T b){if (a < b){a = b;return true;} else return false;} template bool chmin(T &a, T b){if (a > b){a = b;return true;} else return false;} int h,w; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); cin>>h>>w; vector>S(h,vector(w)); if(w%2==0){ int x=1; rep(i,h){ if(i%2==0){ for(int j=0;j=0;j-=2){ S[i][j]=x++; } } } rrep(i,h){ if(i%2!=(h-1)%2){ for(int j=1;j=1;j-=2){ S[i][j]=x++; } } } }else{ int x=1; rep(i,h){ if(i%2==0){ for(int j=0;j=0;j-=2){ S[i][j]=x; x+=2; } } x--; } x=2; rrep(i,h){ if(i%2!=(h-1)%2){ for(int j=1;j=1;j-=2){ S[i][j]=x; x+=2; } } x++; } } cout<<"Yes"<<"\n"; rep(i,h){ rep(j,w)cout<