import java.io.{BufferedReader, InputStreamReader}

object Main {
  def main(args: Array[String]): Unit = {
    val Array(a,b) = new BufferedReader(new InputStreamReader(System.in)).readLine().split("\\s+").map(_.toInt)
    System.out.println(
      if (a < 10 && b < 10) {
        a * b
      } else {
        -1
      }
    )
  }
}
