Problem: Students went into a class to write a test and sat in some way. The teacher thought: "Probably they sat in this order to copy works of each other. I need to rearrange them in such a way that students that were neighbors are not neighbors in a new seating."

The class can be represented as a matrix with n rows and m columns with a student in each cell. Two students are neighbors if cells in which they sit have a common side.

Let's enumerate students from 1 to n·m in order of rows. So a student who initially sits in the cell in row i and column j has a number (i - 1)·m + j. You have to find a matrix with n rows and m columns in which all numbers from 1 to n·m appear exactly once and adjacent numbers in the original matrix are not adjacent in it, or determine that there is no such matrix.

Input

The only line contains two integers n and m (1 ≤ n, m ≤ 105; n·m ≤ 105) — the number of rows and the number of columns in the required matrix.

Output

If there is no such matrix, output "NO" (without quotes). 

Otherwise in the first line output "YES" (without quotes), and in the next n lines output m integers which form the required matrix.

Examples

Input

2 4


Output

YES
5 4 7 2 
3 6 1 8 


Input

2 1


Output

NO

Note

In the first test case the matrix initially looks like this:
    
    
      
    1 2 3 4  
    5 6 7 8  
    

It's easy to see that there are no two students that are adjacent in both matrices.

In the second test case there are only two possible seatings and in both of them students with numbers 1 and 2 are neighbors.

Solution (in JAVA):

Solution:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Random;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

public class d {

	public static void main(String args[]) throws IOException {
		FastScanner in = new FastScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int dx[] = { -1, 0, 1, 0 };
		int dy[] = { 0, 1, 0, -1 };
		// BEGIN HERE
		int r = in.nextInt(), c = in.nextInt();
		if (r == 1 && c == 1) {
			System.out.println("YES");
			System.out.println(1);
			return;
		}
		if (r <= 2 && c <= 2) {
			System.out.println("NO");
			return;
		}
		if (r < 6 && c < 6 || r * c < 12) {
			ArrayList<Integer> bfer = new ArrayList<>();
			for (int i = 0; i < r; i++) {
				for (int j = 0; j < c; j++) {
					// if((i + j) % 2 == 1) {
					bfer.add(i * c + j + 1);
					// }
				}
			}
			int world[][] = new int[r][c];

			Random rand = new Random();
			rand.setSeed(900);
			for (int z = 0; z < 2000000; z++) {
				int idx = 0;
				for (int i = 0; i < bfer.size(); i++) {
					int ni = (int) (Math.abs(rand.nextInt()) % bfer.size());
					int temp = bfer.get(i);
					bfer.set(i, bfer.get(ni));
					bfer.set(ni, temp);
				}

				boolean good = true;
				int banned[] = new int[4];
				for (int i = 0; i < r && good; i++) {
					for (int j = 0; j < c && good; j++) {
						// if((i + j) % 2 == 1) {
						int t = bfer.get(idx++);
						banned[0] = t - c;
						banned[1] = t + c;
						banned[2] = t - 1;
						banned[3] = t + 1;
						for (int k = 0; k < 4; k++) {
							int nr = dx[k] + i;
							int nc = dy[k] + j;
							if (nr < 0 || nc < 0 || nr >= r || nc >= c)
								continue;
							int v = world[nr][nc];
							for (int l = 0; l < 4; l++) {
								if (v == banned[l])
									good = false;
							}
						}
						world[i][j] = t;
						// }
					}
				}
				if (good) {
					System.out.println("YES");
					for (int i = 0; i < r; i++) {
						for (int j = 0; j < c; j++) {
							System.out.print(world[i][j] + " ");
						}
						System.out.println();
					}
					return;
				}
			}
			System.out.println("NO");
			return;
		}
		int world[][] = new int[r][c];
		if (r <= 6) {
			for (int i = 0; i < r; i++) {
				for (int j = 0; j < c; j++) {
					if ((i + j) % 2 == 0) {
						world[i][j] = i * c + j + 1;
					} else {
						int nc = j + 4;
						nc %= c;
						// if(nc %2 != j %2) nc-=1;
						world[i][nc] = i * c + j + 1;
					}
				}
			}
		} else {
			for (int i = 0; i < r; i++) {
				for (int j = 0; j < c; j++) {
					if ((i + j) % 2 == 0) {
						world[i][j] = i * c + j + 1;
					} else {
						int nr = i + 4;
						nr %= r;
						// if(nr % 2 != i %2) nr+=1;
						world[nr][j] = i * c + j + 1;
					}
				}
			}
		}
		boolean good = true;
		int banned[] = new int[4];
		TreeSet<Integer> hs = new TreeSet<>();
		for (int i = 1; i < r * c; i++) {
			hs.add(i);
		}
		for (int i = 0; i < r && good; i++) {
			for (int j = 0; j < c && good; j++) {
				// if((i + j) % 2 == 1) {
				int t = world[i][j];
				hs.remove(t);
			}
		}
		HashSet<Integer> ff = new HashSet<>();
		System.out.println("YES");
		for (int i = 0; i < r && good; i++) {
			for (int j = 0; j < c && good; j++) {
				// if((i + j) % 2 == 1) {
				int t = world[i][j];
				if (t <= 0) {
					world[i][j] = hs.pollLast();
				}
				t = world[i][j];
				if (t > r * c)
					good = false;
				banned[0] = t - c;
				banned[1] = t + c;
				banned[2] = t - 1;
				banned[3] = t + 1;
				boolean g = true;
				for (int k = 0; k < 4; k++) {
					int nr = dx[k] + i;
					int nc = dy[k] + j;
					if (nr < 0 || nc < 0 || nr >= r || nc >= c)
						continue;
					int v = world[nr][nc];
					for (int l = 0; l < 4; l++) {
						if (v == banned[l]){
							
								world[i][j] = hs.pollLast();
								hs.add(t);
								t = world[i][j];
							
							break;
						}
					}
				}
				if(g)System.out.print(t + " ");
				if(g)world[i][j] = t;
				if(g) ff.add(t);
				// }
			}
			System.out.println();
		}
		
		for (int i = 0; i < r && good; i++) {
			for (int j = 0; j < c && good; j++) {
				int t = world[i][j];
				if (t <= 0) {
					good = false;
				}
				banned[0] = t - c;
				banned[1] = t + c;
				banned[2] = t - 1;
				banned[3] = t + 1;
				for (int k = 0; k < 4; k++) {
					int nr = dx[k] + i;
					int nc = dy[k] + j;
					if (nr < 0 || nc < 0 || nr >= r || nc >= c)
						continue;
					int v = world[nr][nc];
					for (int l = 0; l < 4; l++) {
						if (v == banned[l])
							good = false;
					}
				}
			}
		}
//		System.out.println(good);
//		System.out.println(ff.size() + " " + r * c);
		out.close();
	}

	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(InputStream i) {
			br = new BufferedReader(new InputStreamReader(i));
			st = null;
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			if (st == null) {
				st = new StringTokenizer(br.readLine());
			}
			String line = st.nextToken("\n");
			st = null;
			return line;
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}
	}

	public static class combinatorics {
		static long modInv(long a, long b) {
			return 1 < a ? b - modInv(b % a, a) * b / a : 1;
		}

		static long factorial[], mod;

		combinatorics(int n, long MOD) {
			mod = MOD;
			factorial = new long[n + 1];
			factorial[0] = 1;
			for (int i = 1; i <= n; i++) {
				factorial[i] = i * factorial[i - 1];
				factorial[i] %= mod;
			}
		}

		static long nCr(int n, int r) {
			if (r > n)
				return 0;
			return (factorial[n] * modInv((factorial[n - r] * factorial[r]) % mod, mod)) % mod;
		}
	}

	public static class DisjointSet {
		int p[], r[], s[];
		int numDisjoint;

		DisjointSet(int N) {
			numDisjoint = N;
			r = new int[N];
			s = new int[N];
			p = new int[N];
			for (int i = 0; i < N; i++)
				p[i] = i;
		}

		int findSet(int i) {
			return (p[i] == i) ? i : (p[i] = findSet(p[i]));
		}

		boolean isSameSet(int i, int j) {
			return findSet(i) == findSet(j);
		}

		void unionSet(int i, int j) {
			if (!isSameSet(i, j)) // if from different set
			{
				numDisjoint--;
				int x = findSet(i), y = findSet(j);
				if (r[x] > r[y]) {
					p[y] = x; // rank keeps the tree short
					s[x] += s[y];
				} else {
					p[x] = y;
					if (r[x] == r[y])
						r[y]++;
					s[y] += s[x];
				}
			}
		}

		int sizeOfSet(int i) {
			return s[findSet(i)];
		}
	};

}