fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val a = sc.nextInt()
    val b = sc.nextInt()
    if (1 <= a && a <= 9 && 1 <= b && b <= 9) {
        println(a * b)
    } else {
        println(-1)
    }
}