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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Jialin Ouyang (Jialin.Ouyang@gmail.com)
 */
public class Main {
  public static void main(String[] args) {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    QuickScanner in = new QuickScanner(inputStream);
    QuickWriter out = new QuickWriter(outputStream);
    TaskB solver = new TaskB();
    solver.solve(1, in, out);
    out.close();
  }

  static class TaskB {
    int[][] board;

    public void solve(int testNumber, QuickScanner in, QuickWriter out) {
      int n = in.nextInt();
      int m = in.nextInt();
      board = new int[n][m];
      if (calcBoard(Math.min(n, m), Math.max(n, m), n > m)) {
        out.println("YES");
        for (int i = 0; i < n; ++i) {
          for (int j = 0; j < m; ++j) {
            out.print(board[i][j] + 1);
            out.print(' ');
          }
          out.println();
        }
      } else {
        out.println("NO");
      }
    }

    boolean calcBoard(int n, int m, boolean reversed) {
      if (n * m <= 9) {
        return calcBruteForce(n, m, reversed);
      }
      for (int i = 0; i < n; ++i) {
        int j = i & 1;
        for (int k = 1; k < m; k += 2) {
          int v = calcGrid(i, k, n, m, reversed);
          if (reversed) {
            board[j][i] = v;
          } else {
            board[i][j] = v;
          }
          j = j + 1 == m ? 0 : j + 1;
        }
        for (int k = 0; k < m; k += 2) {
          int v = calcGrid(i, k, n, m, reversed);
          if (reversed) {
            board[j][i] = v;
          } else {
            board[i][j] = v;
          }
          j = j + 1 == m ? 0 : j + 1;
        }
      }
      return true;
    }

    boolean calcBruteForce(int n, int m, boolean reversed) {
      int nm = n * m;
      boolean[][] invalid = new boolean[nm][nm];
      for (int i = 0; i < n; ++i)
        for (int j = 0; j < m; ++j) {
          int u = calcGrid(i, j, n, m, reversed);
          if (i > 0) {
            int v = calcGrid(i - 1, j, n, m, reversed);
            invalid[u][v] = invalid[v][u] = true;
          }
          if (j > 0) {
            int v = calcGrid(i, j - 1, n, m, reversed);
            invalid[u][v] = invalid[v][u] = true;
          }
        }
      int[] perm = new int[nm];
      for (int i = 0; i < nm; ++i) perm[i] = i;
      boolean found;
      do {
        found = true;
        int idx = 0;
        for (int i = 0; i < n; ++i) {
          for (int j = 0; j < m; ++j) {
            if (i > 0 && invalid[perm[idx]][perm[idx - m]]) {
              found = false;
              break;
            }
            if (j > 0 && invalid[perm[idx]][perm[idx - 1]]) {
              found = false;
              break;
            }
            ++idx;
          }
          if (!found) break;
        }
      } while (!found && IntArrayUtils.nextPermutation(perm));
      int idx = 0;
      for (int i = 0; i < n; ++i)
        for (int j = 0; j < m; ++j) {
          if (reversed) {
            board[j][i] = perm[idx];
          } else {
            board[i][j] = perm[idx];
          }
          ++idx;
        }
      return found;
    }

    int calcGrid(int x, int y, int n, int m, boolean reversed) {
      if (reversed) {
        return y * n + x;
      } else {
        return x * m + y;
      }
    }

  }

  static class QuickScanner {
    private static final int BUFFER_SIZE = 1024;
    private InputStream stream;
    private byte[] buffer;
    private int currentPosition;
    private int numberOfChars;

    public QuickScanner(InputStream stream) {
      this.stream = stream;
      this.buffer = new byte[BUFFER_SIZE];
      this.currentPosition = 0;
      this.numberOfChars = 0;
    }

    public int nextInt() {
      int c = nextNonSpaceChar();
      boolean positive = true;
      if (c == '-') {
        positive = false;
        c = nextChar();
      }
      int res = 0;
      do {
        if (c < '0' || '9' < c) throw new RuntimeException();
        res = res * 10 + (c - '0');
        c = nextChar();
      } while (!isSpaceChar(c));
      return positive ? res : -res;
    }

    public int nextNonSpaceChar() {
      int res = nextChar();
      for (; isSpaceChar(res) || res < 0; res = nextChar()) ;
      return res;
    }

    public int nextChar() {
      if (numberOfChars == -1) {
        throw new RuntimeException();
      }
      if (currentPosition >= numberOfChars) {
        currentPosition = 0;
        try {
          numberOfChars = stream.read(buffer);
        } catch (Exception e) {
          throw new RuntimeException(e);
        }
        if (numberOfChars <= 0) {
          return -1;
        }
      }
      return buffer[currentPosition++];
    }

    public boolean isSpaceChar(int c) {
      return c == ' ' || c == '\t' || isEndOfLineChar(c);
    }

    public boolean isEndOfLineChar(int c) {
      return c == '\n' || c == '\r' || c < 0;
    }

  }

  static class IntArrayUtils {
    public static void reverse(int[] values, int fromIdx, int toIdx) {
      for (int i = fromIdx, j = toIdx - 1; i < j; ++i, --j) {
        swap(values, i, j);
      }
    }

    public static void swap(int[] values, int uIdx, int vIdx) {
      if (uIdx == vIdx) return;
      values[uIdx] ^= values[vIdx];
      values[vIdx] ^= values[uIdx];
      values[uIdx] ^= values[vIdx];
    }

    public static boolean nextPermutation(int[] values) {
      return nextPermutation(values, 0, values.length);
    }

    public static boolean nextPermutation(int[] values, int fromIdx, int toIdx) {
      int pos = -1;
      for (int i = toIdx - 2; i >= fromIdx; --i)
        if (values[i] < values[i + 1]) {
          pos = i;
          break;
        }
      if (pos < 0) return false;
      int newPos = -1;
      for (int i = toIdx - 1; i > pos; --i)
        if (values[pos] < values[i]) {
          newPos = i;
          break;
        }
      swap(values, pos, newPos);
      reverse(values, pos + 1, toIdx);
      return true;
    }

  }

  static class QuickWriter {
    private final PrintWriter writer;

    public QuickWriter(OutputStream outputStream) {
      this.writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public QuickWriter(Writer writer) {
      this.writer = new PrintWriter(writer);
    }

    public void print(Object... objects) {
      for (int i = 0; i < objects.length; ++i) {
        if (i > 0) {
          writer.print(' ');
        }
        writer.print(objects[i]);
      }
    }

    public void println(Object... objects) {
      print(objects);
      writer.println();
    }

    public void close() {
      writer.close();
    }

  }
}