#include using namespace std; int main(){ int H, W; cin >> H >> W; vector> A(H, vector(W)); int X = 0; for (int i = 0; i < H; i++){ for (int j = 0; j < W; j++){ if ((i + j) % 2 == 0){ A[i][j] = X; X++; } } } for (int i = H - 1; i >= 0; i--){ for (int j = W - 1; j >= 0; j--){ if ((i + j) % 2 == 1){ A[i][j] = X; X++; } } } cout << "Yes" << endl; for (int i = 0; i < H; i++){ for (int j = 0; j < W; j++){ cout << A[i][j] + 1; if (j < W - 1){ cout << ' '; } } cout << endl; } }