#include<bits/stdc++.h>
using namespace std;
using ll = long long;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int h, w, c0 = 1, c1;
    cin >> h >> w;
    c1 = h * w;
    cout << "Yes" << '\n';
    vector<vector<int>> A(h, vector<int>(w));
    for(int y = 0; y < h; y++){
        for(int x = 0; x < w; x++){
            if((y + x) & 1)A[y][x] = c1--;
            else A[y][x] = c0++;
            cout << A[y][x] << (x + 1 == w ? '\n' : ' ');
        }
    }
}