mod = 998244353 def main(): import sys input = sys.stdin.readline H, W = map(int, input().split()) print("Yes") ans = [[0] * W for _ in range(H)] for h in range(H): for w in range(W): if (h + w) & 1: ans[h][w] = H * W - (h * W + w) else: ans[h][w] = h * W + w + 1 for h in range(H): print(*ans[h]) S = ans[0][0] + ans[0][1] + ans[1][0] + ans[1][1] for h in range(H - 1): for w in range(W - 1): assert ans[h][w] + ans[h+1][w] + ans[h][w+1] + ans[h+1][w+1] == S if __name__ == '__main__': main()