fun main(args: Array<String>) {
	val a = readLine()!!.toInt()
	val b = readLine()!!.toInt()

	println(answer(a, b))
}

fun answer(a: Int, b: Int): Int {
	if (a !in 1..9 && b !in 1..9) return -1
    return a * b
}