function main(input) {
  var a = parseInt(input[0].split(" ")[0], 10);
  var b = parseInt(input[0].split(" ")[1], 10);
  if(a < 10 && b < 10) {
    console.log("%d", a * b);
  } else {
    console.log("-1");
  }
}

main(require("fs").readFileSync("/dev/stdin", "utf8").split("\n"));
