h,w = map(int,input().split()) ans = [[0]*(w) for i in range(h)] now = 1 for i in range(h): for j in range(w): if i % 2 == j % 2: ans[i][j] = now now += 1 for i in range(h)[::-1]: for j in range(w)[::-1]: tmp = i*w+j if i%2 != j% 2: ans[i][j] = now now += 1 flg = True s = ans[0][0] + ans[0][1] + ans[1][0] + ans[1][1] for i in range(h-1): for j in range(w-1): if ans[i][j] +ans[i+1][j] +ans[i][j+1] +ans[i+1][j+1] == s: continue flg = False if flg: print('Yes') for i in ans: print(*i) else: print('No')