function Main(input) {
  input = input.split(" ");
  var A = input[0];
  var B = input[1];
  if(A<10&&B<10){
    console.log(A*B);
  }
  else{
    console.log("-1");
  }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));