const main = stdin => {
  const input = stdin.trim().split('\n')
  const [A, B] = input[0].split(' ').map(x => parseInt(x))
  if (A < 10 && B < 10) {
    console.log(A * B)
  } else {
    console.log(-1)
  }
}

// 標準入力
main(require("fs").readFileSync("/dev/stdin", "utf8"))
