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:
/**
 * Created by IntelliJ IDEA.
 * User: Taras_Brzezinsky
 * Date: 9/13/11
 * Time: 5:33 PM
 * To change this template use File | Settings | File Templates.
 */


import com.sun.org.apache.xerces.internal.impl.xpath.regex.Match;

import java.awt.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.IOException;
import java.util.*;

public class TaskA extends Thread {
    public TaskA() {
        this.input = new BufferedReader(new InputStreamReader(System.in));
        this.output = new PrintWriter(System.out);
        this.setPriority(Thread.MAX_PRIORITY);
    }

    private void solve() throws Throwable {
        int n = nextInt(), m = nextInt();
        HashSet<Integer> was = new HashSet<Integer>();
        Random rnd = new Random(System.currentTimeMillis());
        int [][]grid = new int[n][m];
        for (int iteration = 0; iteration < ITERATIONS; ++iteration) {
            was.clear();
            for (int[] current : grid) {
                Arrays.fill(current, 0);
            }
            int start = 1, x, y;
            while (start <= n * m) {
                x = rnd.nextInt(n);
                y = rnd.nextInt(m);
                while (was.contains(x * PRIME + y)) {
                    x = rnd.nextInt(n);
                    y = rnd.nextInt(m);
                }
                was.add(x * PRIME + y);
                grid[x][y] = start++;
            }
            boolean good = true;
            for (int i = 0; i + 1 < n && good; ++i) {
                for (int j = 0; j + 1 < m && good; ++j) {
                    if (Math.min(Math.abs(grid[i][j] - grid[i + 1][j]), Math.abs(grid[i][j] - grid[i][j + 1])) <= 1) {
                        good = false;
                    }
                }
            }
            for (int i = 0; i + 1 < n && good; ++i) {
                good &= Math.abs(grid[i][m - 1] - grid[i + 1][m - 1]) > 1;
            }
            for (int i = 0; i + 1 < m && good; ++i) {
                good &= Math.abs(grid[n - 1][i] - grid[n - 1][i + 1]) > 1;
            }
            if (good) {
                for (int[] current : grid) {
                    for (int t : current) {
                        output.print(t + " ");
                    }
                    output.println();
                }
                return;
            }
        }
        output.println(-1);
    }

    public void run() {
        try {
            solve();
        } catch (Throwable e) {
            System.err.println(e.getMessage());
            e.printStackTrace();
            System.exit(666);
        } finally {
            output.flush();
            output.close();
        }
    }

    public static void main(String[] args) {
        new TaskA().start();
    }

    private int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    private long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    private double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    private String nextToken() throws IOException {
        while (tokens == null || !tokens.hasMoreTokens()) {
            tokens = new StringTokenizer(input.readLine());
        }
        return tokens.nextToken();
    }

    static final int ITERATIONS = 1000;
    static final int PRIME = 157;
    private BufferedReader input;
    private PrintWriter output;
    private StringTokenizer tokens = null;
}