function Main(input) {
  input = input.split(' ')
  var a = input[0]
  var b = input[1]
  if (a > 9 || b > 9) {
    console.log(-1)
  } else {
    console.log(a*b)
  }

}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));