#include using namespace std; #ifdef _RUTHEN #include #else #define show(...) true #endif using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) template using V = vector; int main() { ios::sync_with_stdio(false); cin.tie(0); int H, W; cin >> H >> W; cout << "Yes\n"; auto f = [&](int i, int j) -> int { return (i % 2 == 0 ? i * W + j + 1 : i * W + W - j); }; rep(i, H) rep(j, W) cout << (j % 2 == 1 ? f(H - 1 - i, j) : f(i, j)) << " \n"[j == W - 1]; return 0; }