import sys, random input = lambda : sys.stdin.readline().rstrip() write = lambda x: sys.stdout.write(x+"\n"); writef = lambda x: print("{:.12f}".format(x)) debug = lambda x: sys.stderr.write(x+"\n") YES="Yes"; NO="No"; pans = lambda v: print(YES if v else NO); INF=10**18 LI = lambda : list(map(int, input().split())); II=lambda : int(input()); SI=lambda : [ord(c)-ord("a") for c in input()] def debug(_l_): for s in _l_.split(): print(f"{s}={eval(s)}", end=" ") print() def dlist(*l, fill=0): if len(l)==1: return [fill]*l[0] ll = l[1:] return [dlist(*ll, fill=fill) for _ in range(l[0])] h,w = list(map(int, input().split())) ans = [[0]*w for _ in range(h)] v = 1 for i in range(0,h,2): for j in range(w): ans[i][j] = v v += 1 for i in range(1,h,2): for j in range(w)[::-1]: ans[i][j] = v v += 1 for j in range(0,w,2): vs = [] for i in range(1,h,2): vs.append(ans[i][j]) for i in range(1,h,2): ans[i][j] = vs.pop() for j in range(1,w,2): vs = [] for i in range(0,h,2): vs.append(ans[i][j]) for i in range(0,h,2): ans[i][j] = vs.pop() s = set() for i in range(h-1): for j in range(w-1): s.add(ans[i][j]+ans[i+1][j]+ans[i][j+1]+ans[i+1][j+1]) assert len(s)==1 print("Yes") for item in ans: write(" ".join(map(str, item)))