h, w = map(int, input().split()) ANS = [[0 for _ in range(w)] for _ in range(h)] curr = 1 for i in range(h): for j in range(w): if (i + j) % 2 == 0: ANS[i][j] = curr curr += 1 for i in range(h - 1, -1, -1): for j in range(w - 1, -1, -1): if (i + j) % 2 == 1: ANS[i][j] = curr curr += 1 print("Yes") for i in range(h): print(*ANS[i])