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