fun main(args: Array<String>) {
    val (A, B) = listOfInt()
    println(if (A in 1..9 || B in 1..9) A * B else -1)
}
fun next() = readLine()!!
fun listOfString() = next().split(" ")
fun listOfInt(delta: Int = 0) = listOfString().map { it.toInt() + delta }