#include using namespace std; int main() { int h, w; cin >> h >> w; cout << "Yes" << endl; int l = 0, r = h * w; for(int i = 0; i < h; i++) { for(int j = 0; j < w; j++) { cout << ((i + j) % 2 ? ++l : r--) << " "; } cout << endl; } }