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.*;
import java.util.*;
public class Seating {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskE solver = new TaskE();
        solver.solve(1, in, out);
        out.flush();out.close();
    }
        static class TaskE {
        boolean chk(int a[][],int n,int m) {
        	for(int i=1;i<=n;i++) {
        		for(int j=1;j<=m;j++) {
        			int J=a[i][j]%m,I=(a[i][j]-1)/m+1;if(J==0)J=m;
        			for(int k=0;k<4;k++) {
        				for(int z=0;z<4;z++) {
        					int ai=i+l[z][0],aj=j+l[z][1];
        					int aI=I+l[k][0],aJ=J+l[k][1];
        					if(ai>n||aI>n||aj>m||aJ>m||ai<1||aI<1||aj<1||aJ<1)continue;
        					if(a[ai][aj]==(aI-1)*m+aJ) {
        						System.out.println(i+" "+j+" "+ai+" "+aj+" "+aI+" "+aJ);
        						return false;
        					}
        				}
        			}
        		}
        	}
        	return true;
        }
        int l[][]= {{0,1},{-1,0},{0,-1},{1,0}};
         public void solve(int testNumber, InputReader in, PrintWriter out) {
          int n=in.nextInt(),m=in.nextInt();
          boolean inv=false,ans=false;
          if(n>m) {
        	  inv=true;n^=m;m^=n;n^=m;
          }
          int a[][]={{0,0,0,0},{0,6,1,8},{0,7,5,3},{0,2,9,4}};
          if(m==3&&n==3) {
      		ans=true;
      	  }
          else {
        	  a=new int[n+1][m+1];
              if(!inv) {
            	  for(int i=1;i<=n;i++) {
                	  for(int j=1;j<=m;j++)a[i][j]=(i-1)*m+j;
                  }
              }else {
            	  for(int i=1;i<=m;i++) {
                	  for(int j=1;j<=n;j++)a[j][i]=(i-1)*n+j;
                  }
              }
          }
          if(m>=4||(m==1&&n==1)) {ans=true;
        	  if(n==1) {
        		  int b[][]=new int[2][m+1];
        		  for(int i=m/2,p=1;i>=1;i-=1,p+=1) {
        			  b[1][p]=a[1][i];b[1][m-p+1]=a[1][m-i+1];
        			  if(p%2==0) {
        				  b[1][p]^=b[1][m-p+1];
        				  b[1][m-p+1]^=b[1][p];
        				  b[1][p]^=b[1][m-p+1];
        			  }
        		  }
        		  for(int i=1;i<=m;i++)a[1][i]=b[1][i];
        		  if(m%2!=0)a[1][(m+1)/2]=(m+1)/2;
        	  }
        	  else {
        		  for(int i=2;i<n+1;i++) {
        			  if(i%2==0) {
        				  for(int j=1;j<=m;j+=2) {
        					  a[i][j]^=a[i-1][j];
        					  a[i-1][j]^=a[i][j];
        					  a[i][j]^=a[i-1][j];
        				  }
        				  int p=m%2==0?a[i][m-1]:a[i][m];
        				  for(int j=1;j<=m;j+=2) {
        					  int t=a[i][j];a[i][j]=p;p=t;
        				  }
        				  int p1=a[i][m-m%2];
        				  for(int j=2;j<=m;j+=2) {
        					  int t=a[i][j];a[i][j]=p1;p1=t;
        				  }
        			  }else {
        				  for(int j=2;j<=m;j+=2) {
        					  a[i][j]^=a[i-1][j];
        					  a[i-1][j]^=a[i][j];
        					  a[i][j]^=a[i-1][j];
        				  }
        			  }
        		  }
        	  }
        	}
          if(ans) {
        	  out.println("YES");
        	  if(!inv) {
        		  for(int i=1;i<=n;i++) {
            		  for(int j=1;j<=m;j++)out.print(a[i][j]+" ");
            		  out.println();
            	  }
        	  }else {
        		  for(int i=1;i<=m;i++) {
            		  for(int j=1;j<=n;j++)out.print(a[j][i]+" ");
            		  out.println();
            	  }
        	  }
          }else out.print("NO");
         //out.print("\n"+chk(a,n,m));
       }
    }
    static class InputReader {
        BufferedReader br;
        StringTokenizer st;
        public InputReader(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream));
            st = null;
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return null;
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

        boolean hasMoreTokens() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return false;
                st = new StringTokenizer(s);
            }
            return true;
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong() {
            return Long.parseLong(next());
        }
        public double nextDouble() {
            return Double.parseDouble(next());
        }
    }
}