fun solve(a:Int, b:Int){
    if(a in 1..9 && b in 1..9){
        println(a*b)
    }
    else{
        println(-1)
    }
}

fun main(){
    val (a, b) = readLine()!!.split(" ").map{it.toInt()}
    solve(a,b)
}