Problem: Vasya is a Greencode wildlife preservation society proponent. One day he found an empty field nobody owned, divided it into n × m squares and decided to plant a forest there. Vasya will plant nm trees of all different heights from 1 to nm. For his forest to look more natural he wants any two trees growing in the side neighbouring squares to have the absolute value of difference in heights to be strictly more than 1. Help Vasya: make the plan of the forest planting for which this condition is fulfilled.

Input

The first line contains two space-separated integers n and m (1 ≤ n, m ≤ 100) — the number of rows and columns on Vasya's field

Output

If there's no solution, print -1. Otherwise, print n lines containing m numbers each — the trees' planting plan. In every square of the plan the height of a tree that should be planted on this square should be written. If there are several solutions to that problem, print any of them.

Examples

Input

2 3


Output

3 6 2
5 1 4


Input

2 1


Output

-1

Solution (in JAVA):

Solution:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
import java.util.HashSet;

public class J45 {

    static StreamTokenizer in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
    static PrintWriter out = new PrintWriter(System.out);
    
    static int nextInt() throws IOException {
        in.nextToken();
        return Integer.valueOf(in.sval);
    }
    
    static double nextDouble() throws IOException {
        in.nextToken();
        return Double.valueOf(in.sval);
    }
    
    static String nextString() throws IOException {
        in.nextToken();
        return in.sval;
    }
    
    static {
        in.ordinaryChars('0', '9');
        in.wordChars('0', '9');
        
        in.ordinaryChars('.', '.');
        in.wordChars('.', '.');
        
        in.ordinaryChars('-', '-');
        in.wordChars('-', '-');
    }

    public static void main(String[] args) throws IOException {
        int n = nextInt(), m = nextInt();
        //for (int N = 1; N <= 100; N++) for (int M = 1; M <= 100; M++) {
        //int n = N, m = M;
        //out.println(n + " " + m + ":");
        boolean trans = false;
        if (n < m) {
            int tmp = n;
            n = m;
            m = tmp;
            trans = true;
        }
        
        boolean good = true;
        int[][] ans = new int[n][m];
        if (m == 1 && n > 1 && n < 4) good = false;
        else if (n == 2 && m == 2) good = false;
        else {
            if (m == 1) {
                int p = 0;
                for (int i = 2; i <= n; i += 2)
                    ans[p++][0] = i;
                for (int i = 1; i <= n; i += 2)
                    ans[p++][0] = i;
            }
            else {
                for (int i = 0; i < n; i++) {
                    int e = i+1;
                    for (int j = 0, k = i%m; j < m; j++, k = (k+1)%m) {
                        ans[i][k] = e;
                        e += n;
                    }
                }
            }
        }
        
        if (good) {
            if (trans) {
                int[][] tmp = new int[m][n];
                for (int i = 0; i < n; i++)
                    for (int j = 0; j < m; j++)
                        tmp[j][i] = ans[i][j];
                ans = tmp;
            }
        
            for (int i = 0; i < ans.length; i++) {
                for (int j = 0; j < ans[i].length; j++)
                    out.print(ans[i][j] + " ");
                out.println();
            }
            
            /*HashSet<Integer> s = new HashSet<Integer>();
            for (int i = 0; i < ans.length; i++)
                for (int j = 0; j < ans[i].length; j++) {
                    if (i > 0 && Math.abs(ans[i][j] - ans[i-1][j]) <= 1) {
                        out.println("oops");
                        out.flush();
                        System.exit(0);
                    }
                    if (i < ans.length-1 && Math.abs(ans[i][j] - ans[i+1][j]) <= 1) {
                        out.println("oops");
                        out.flush();
                        System.exit(0);
                    }
                    if (j > 0 && Math.abs(ans[i][j] - ans[i][j-1]) <= 1) {
                        out.println("oops");
                        out.flush();
                        System.exit(0);
                    }
                    if (j < ans[i].length-1 && Math.abs(ans[i][j] - ans[i][j+1]) <= 1) {
                        out.println("oops");
                        out.flush();
                        System.exit(0);
                    }
                    if (ans[i][j] > n*m) {
                        out.println("oops");
                        out.flush();
                        System.exit(0);
                    }
                    if (s.contains(ans[i][j])) {
                        out.println("oops");
                        out.flush();
                        System.exit(0);
                    }
                    s.add(ans[i][j]);
                }*/
        }
        else out.println("-1");
        //out.println();
        
        out.flush();
        //}
    }

}