object Main {
  def main(args:Array[String]) = {
    val sc = new java.util.Scanner(System.in)
    val a, b = sc.nextInt
    val result = (a,b) match {
      case (n, _) if n > 9 => -1
      case (_, n) if n > 9 => -1
      case (x,y) => x*y
    }
    println(result)
  }
}
