import java.util.Scanner
import java.io.PrintWriter

object Main {
  def main(args: Array[String]): Unit = {
    val sc = new Scanner(System.in)
    val pw = new PrintWriter(System.out)

    val a, b = sc.nextInt()
    if (a > 9 || b > 9) {
      pw.println(-1)
    } else {
      pw.println(a * b)
    }

    pw.flush()
  }
}