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
// Don't place your source in a package
import javax.swing.*;
import java.lang.reflect.Array;
import java.text.DecimalFormat;
import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;
import java.util.stream.Stream;


// Please name your class Main
public class Main {
    static FastScanner fs=new FastScanner();
    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        public String next() {
            while (!st.hasMoreElements())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }
        int Int() {
            return Integer.parseInt(next());
        }

        long Long() {
            return Long.parseLong(next());
        }

        String Str(){
            return next();
        }
    }


    public static void main (String[] args) throws java.lang.Exception {
        PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

        int T=1;
        for(int t=0;t<T;t++){
            int n=Int(),m=Int();

            Solution sol=new Solution(out);
            sol.solution(n,m);
        }
        out.close();

    }

    public static int[] Arr(int n){
        int A[]=new int[n];
        for(int i=0;i<n;i++)A[i]=Int();
        return A;
    }
    public static int Int(){
        return fs.Int();
    }
    public static long Long(){
        return fs.Long();
    }
    public static String Str(){
        return fs.Str();
    }

}








class Solution{
    PrintWriter out;
    public Solution(PrintWriter out){
        this.out=out;
    }


    public void solution(int n,int m){
        int res[][]=new int[n][m];
        boolean seen[][]=new boolean[n][m];
        //1 - n*m
        Queue<int[]>q=new LinkedList<>();
        q.add(new int[]{0,0,0});
        seen[0][0]=true;
        int dir[][]=new int[][]{{1,0},{0,1}};
        int t2=n*m;

        while(q.size()>0){
            int top[]=q.poll();
            int r=top[0],c=top[1],level=top[2];
            if(level%2==0){

            }
            else{
                res[r][c]=t2;
                t2--;
            }
            for(int p[]:dir){
                int x=top[0]+p[0];
                int y=top[1]+p[1];
                if(x<0||y<0||x>=res.length||y>=res[0].length)continue;
                if(!seen[x][y]){
                    seen[x][y]=true;
                    q.add(new int[]{x,y,level+1});
                }
            }
        }



        seen=new boolean[n][m];
        q.add(new int[]{0,0,0});
        seen[0][0]=true;
        while(q.size()>0){
            int top[]=q.poll();
            int r=top[0],c=top[1],level=top[2];
            if(level%2==1){

            }
            else{
                res[r][c]=t2;
                t2--;
            }
            for(int p[]:dir){
                int x=top[0]+p[0];
                int y=top[1]+p[1];
                if(x<0||y<0||x>=res.length||y>=res[0].length)continue;
                if(!seen[x][y]){
                    seen[x][y]=true;
                    q.add(new int[]{x,y,level+1});
                }
            }
        }




        /*for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                out.print(res[i][j]+" ");
            }
            out.println();
        }*/

        if(check(res)){
            for(int i=0;i<n;i++){
                for(int j=0;j<m;j++){
                    out.print(res[i][j]+" ");
                }
                out.println();
            }
        }
        else{
            out.println(-1);
        }

    }

    public boolean check(int A[][]){
        int dir[][]=new int[][]{{0,1},{0,-1},{1,0},{-1,0}};
        for(int i=0;i<A.length;i++){
            for(int j=0;j<A[0].length;j++){
                for(int p[]:dir){
                    int x=i+p[0];
                    int y=j+p[1];
                    if(x<0||y<0||x>=A.length||y>=A[0].length)continue;
                    int dif=Math.abs(A[i][j]-A[x][y]);
                    if(dif<=1){
                        return false;
                    }
                }
            }
        }
        return true;
    }

}











/*
                             ;\
                            |' \
         _                  ; : ;
        / `-.              /: : |
       |  ,-.`-.          ,': : |
       \  :  `. `.       ,'-. : |
        \ ;    ;  `-.__,'    `-.|
         \ ;   ;  :::  ,::'`:.  `.
          \ `-. :  `    :.    `.  \
           \   \    ,   ;   ,:    (\
            \   :., :.    ,'o)): ` `-.
           ,/,' ;' ,::"'`.`---'   `.  `-._
         ,/  :  ; '"      `;'          ,--`.
        ;/   :; ;             ,:'     (   ,:)
          ,.,:.    ; ,:.,  ,-._ `.     \""'/
          '::'     `:'`  ,'(  \`._____.-'"'
             ;,   ;  `.  `. `._`-.  \\
             ;:.  ;:       `-._`-.\  \`.
              '`:. :        |' `. `\  ) \
      -hrr-      ` ;:       |    `--\__,'
                   '`      ,'
                        ,-'


                      free bug dog
*/

