#include <bits/stdc++.h>

#include <atcoder/modint>
using namespace std;
using mint = atcoder::modint998244353;
void fast_io() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
}

int main() {
    fast_io();
    int h, w;
    cin >> h >> w;
    cout << "Yes\n";
    vector<vector<int>> ans(h, vector<int>(w, 0));
    deque<int> dq;
    for (int i = 1; i <= h * w; i++) {
        dq.push_back(i);
    }
    for (int i = 0; i < (h % 2 && w % 2 ? h - 1 : h); i++) {
        for (int j = 0; j < w; j++) {
            if (i % 2 == 0) {
                ans[i][j] = dq.front();
                dq.pop_front();
            } else {
                ans[i][j] = dq.back();
                dq.pop_back();
            }
            if (i % 2 && j % 2) {
                swap(ans[i - 1][j], ans[i][j]);
            }
        }
    }
    if (h % 2 && w % 2) {
        int s = ans[0][0] + ans[0][1] + ans[1][0] + ans[1][1];
        ans[h - 1][0] = dq.front();
        for (int i = 1; i < w; i++) {
            ans[h - 1][i] =
                s - ans[h - 1][i - 1] - ans[h - 2][i - 1] - ans[h - 2][i];
        }
    }
    for (int i = 0; i < h; i++) {
        for (int j = 0; j < w; j++) {
            cout << ans[i][j] << " ";
        }
        cout << "\n";
    }
}