object Main {
  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)
    val a, b = sc.nextInt
    sc.close()

    val ans = if (a > 9 || b > 9) -1 else a * b
    println(ans)
  }
}