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.IOException;
import java.io.Reader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.BufferedReader;
import java.util.NoSuchElementException;
import java.io.InputStream;

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

  static class TaskB {
    public void solve(int testNumber, InputReader in, OutputWriter out) {
      int r = in.nextInt();
      int c = in.nextInt();
      int[][] mp = solve(r, c);
      if (mp == null) {
        out.println("NO");
      } else {
        out.println("YES");
        for (int i = 0; i < r; i++) out.printInts(mp[i]);
      }
    }

    private int[][] solve(int r, int c) {
      boolean reversed = false;
      if (r > c) {
        reversed = true;
      }
      int[][] res = new int[r][c];
      int id = 0;
      for (int i = 0; i < r; i++) {
        for (int j = 0; j < c; j++) {
          res[i][j] = ++id;
        }
      }
      if (reversed) {
        int temp = r;
        r = c;
        c = temp;
        res = reverse(res);
      }

      if (r == 1) {
        if (c == 2 || c == 3) return null;
      } else if (r == 2 && (c == 2 || c == 3)) {
        return null;
      } else if (r == 3 && c == 3) {
        res[0] = new int[]{6, 1, 8};
        res[1] = new int[]{7, 5, 3};
        res[2] = new int[]{2, 9, 4};
        return res;
      }

      if (r == 1) {
        if (c == 1) {
          res[0][0] = 1;
        } else {
          fill(res[0], 1, c);
        }
      } else {
        for (int i = 1; i < r; i += 2) {
          int[] arr = new int[c];
          for (int j = 0; j < c; j++) {
            arr[j] = res[i][(j - 2 + c) % c];
          }
          res[i] = arr;
        }
        for (int j = 1; j < c; j += 2) {
          int temp = res[0][j];
          for (int i = 0; i < r - 1; i++) {
            res[i][j] = res[i + 1][j];
          }
          res[r - 1][j] = temp;
        }
      }

      return reversed ? reverse(res) : res;
    }

    private void fill(int[] arr, int from, int to) {
      if (arr.length == 4) {
        arr[0] = from + 1;
        arr[1] = from + 3;
        arr[2] = from;
        arr[3] = from + 2;
        return;
      }
      int cur = 0;
      int value = from;
      while (value <= to) {
        arr[cur++] = value;
        value += 2;
      }
      value = from + 1;
      while (value <= to) {
        arr[cur++] = value;
        value += 2;
      }
    }

    private int[][] reverse(int[][] mp) {
      int r = mp.length;
      int c = mp[0].length;
      int[][] res = new int[c][r];
      for (int i = 0; i < r; i++) {
        for (int j = 0; j < c; j++) {
          res[j][i] = mp[i][j];
        }
      }
      return res;
    }

  }

  static class InputReader {
    public final BufferedReader reader;
    public StringTokenizer tokenizer = null;

    public InputReader(Reader reader) {
      this.reader = new BufferedReader(reader, 32767);
    }

    public InputReader(InputStream inputStream) {
      this(new InputStreamReader(inputStream));
    }

    public String next() {
      if (hasNext()) return tokenizer.nextToken();
      else throw new NoSuchElementException();
    }

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

    public boolean hasNext() {
      while (tokenizer == null || !tokenizer.hasMoreTokens()) {
        try {
          String nextLine = reader.readLine();
          if (nextLine == null) return false;
          tokenizer = new StringTokenizer(nextLine);
        } catch (IOException e) {
          throw new RuntimeException(e);
        }
      }
      return tokenizer.hasMoreTokens();
    }

  }

  static class OutputWriter {
    private final PrintWriter writer;

    private OutputWriter(Writer writer, boolean autoFlush) {
      this.writer = new PrintWriter(new BufferedWriter(writer, 32767), autoFlush);
    }

    public OutputWriter(Writer writer) {
      this(writer, true);
    }

    public OutputWriter(OutputStream outputStream) {
      this(new OutputStreamWriter(outputStream), false);
    }

    public OutputWriter println() {
      writer.println();
      return this;
    }

    public OutputWriter println(String string) {
      writer.println(string);
      return this;
    }

    public OutputWriter print(int value) {
      writer.print(value);
      return this;
    }

    public OutputWriter print(Object object) {
      writer.print(object);
      return this;
    }

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

    public void printInts(int[] values) {
      for (int i = 0; i < values.length; i++) {
        if (i > 0) print(" ");
        print(values[i]);
      }
      println();
    }

  }
}