import java.io.*;
import java.util.*;
import java.math.*;
     
public class Main {
	//static int dir[][]={{0,1},{0,-1},{1,0},{-1,0}};
	public static void main(String[] args) throws Exception {
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      OutputStream outputStream = System.out;
      PrintWriter out = new PrintWriter(outputStream);

      int i, j, u=0, v=0;
      StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
      int m = Integer.parseInt(st.nextToken());
      if(n>9 || n<1 || m>9 || m<1)
        out.print("-1");
      else
        out.print(n*m);
    	out.flush();
    	out.close();
    	}
    }
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz