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.math.*;
import java.util.*;
public class Main{
  public static void main(String[] args){
    InputReader reader = new InputReader(System.in);
    PrintWriter pw = new PrintWriter(System.out);
    int n = reader.nextInt();
    int m = reader.nextInt();
    if(m == 1 && n == 1){
      pw.printf("YES\n1");
      pw.flush();
      pw.close(); 
      return;
    }
    if(m == 3 && n == 3){
      pw.printf("YES\n2 7 6\n9 5 1\n4 3 8");
      pw.flush();
      pw.close(); 
      return;
    }
    
    if(m < 4 && n < 4){
      pw.printf("NO\n");
      pw.flush();
      pw.close(); 
      return;
    }
    pw.printf("YES\n");
    boolean transposed = !(n<m);
    int min = Math.min(n,m);
    int max = Math.max(n,m);
    n = min;
    m = max;
    int[][] tab = new int[n][m];
    
    if(!transposed){
      for(int i=0;i<n;++i){
        for(int j=0;j<m;++j){
          tab[i][j] = i*m+j+1;
        }
      }
    } else {
      for(int j=0;j<m;++j){
        for(int i=0;i<n;++i){
          tab[i][j] = j*n+i+1;
        }
      }
    }
    
    if(n == 1){
      if(m == 4){
        tab[0][0]= 2;
        tab[0][1]= 4;
        tab[0][2]= 1;
        tab[0][3]= 3;
      } else {
        int k = 0;
        int cnt = 1;
        while(cnt <= m){
          tab[0][k++] = cnt;
          cnt+=2;
        }
        cnt = 2;
        while(cnt <= m){
          tab[0][k++] = cnt;
          cnt+=2;
        }
      }
    } else {
      int tmp[] = new int[n];
      for(int i=0;i<m;++i){
        if(i%2 == 1){
          for(int j=0;j<n;++j){
            tmp[j] = tab[(j+n-1)%n][i];
          }
          for(int j=0;j<n;++j){
            tab[j][i] = tmp[j];
          }
        }
      }
      tmp = new int[m];
      for(int i=0;i<n;++i){
        if(i%2 == 1){
          for(int j=0;j<m;++j){
            tmp[j] = tab[i][(j+m-2)%m];
          }
          for(int j=0;j<m;++j){
            tab[i][j] = tmp[j];
          }
        }
      }
    }
    
    if(!transposed){
      for(int i=0;i<n;++i){
        for(int j=0;j<m;++j){
          pw.printf("%d ", tab[i][j]);
        }
        pw.println();
      }
    } else {
      for(int i=0;i<m;++i){
        for(int j=0;j<n;++j){
          pw.printf("%d ", tab[j][i]);
        }
        pw.println();
      }
    }
    
    pw.flush();
    pw.close();
  }
  
  
  
  public static class InputReader {
    BufferedReader reader;
    StringTokenizer tokenizer;
    
    public InputReader (InputStream stream){
      reader = new BufferedReader(new InputStreamReader(stream));
    }
    
    public String next(){
      while(tokenizer == null || !tokenizer.hasMoreTokens()){
        try{
          String line = reader.readLine();
          if(line == null){
            return "0";
          }
          tokenizer = new StringTokenizer(line);
        } catch(IOException ioe){
          throw new RuntimeException(ioe);
        }
      }
      return tokenizer.nextToken();
    }
    
    public int nextInt(){
      return Integer.parseInt(next());
    }
    
    public double nextDouble(){
      return Double.parseDouble(next());
    }
    
    public Long nextLong(){
      return Long.parseLong(next());
    }
    
    public BigInteger nextBigInteger(){
      return new BigInteger(next());
    }
    
    public String nextLine(){
      String line = "";
      try{
        while(line.equals("")){
          line = reader.readLine();
        }
      } catch(IOException ioe){
        throw new RuntimeException(ioe);
      }
      return line;
    }
  }
  
  public static class MultiSet<E> {
    HashMap<E, Integer> map = new HashMap<E, Integer>();
    int multiSize = 0;
    public int add(E key){
      multiSize ++;
      Integer amount = map.get(key);
      if(amount == null){
        map.put(key, 1);
        return 1;
      }
      map.put(key, amount+1);
      return amount+1;
    }
    
    public int remove(E key){
      Integer amount = map.get(key);
      if(amount == null){
        return -1;
      }
      multiSize --;
      if(amount == 1){
        map.remove(key);
      } else {
        map.put(key, amount-1);
      }
      return amount-1;
    }
    
    public ArrayList<E> elems(){
      ArrayList<E> ret = new ArrayList<E>(multiSize);
      for(Map.Entry<E, Integer> e : map.entrySet()){
        E key = e.getKey();
        int v = e.getValue();
        while(v-->0){
          ret.add(key);
        }
      }
      return ret;
    }
    
    public int getMultiSize(){
      return multiSize;
    }
  
  }
  
  
   public static class MaxBIT{
    int n;
    int[]t;
    
    public MaxBIT(int n){
      this.n = Integer.highestOneBit(n)<<1;
      this.t = new int[this.n<<1];
      for(int i=0;i<2*this.n;++i){
        t[i] = -1;
      }
    }
  
    public void setMax(int p, int val){
      p+=n;
      while(p>1){
        t[p] = Math.max(t[p], val);
        p>>=1;
      }
    }
    
    public int getMax(int p, int q){
      p+=n;
      q+=n;
      int ret = -1;
      while(p<q){
        if((p&1)==1){
          ret=Math.max(t[p++], ret);
        }
        if((q&1)==1){
          ret=Math.max(t[--q], ret);
        }
        p = p>>1;
        q = q>>1;
      }
      return ret;
    }
  }
  
}