fun main(args: Array<String>){
    val sc: List<String> = readLine()!!.split(" ")
    if(sc[0].toInt() < 10 && sc[1].toInt() < 10) {
        println(sc[0].toInt() * sc[1].toInt())
    }else{
        println("-1")
    }
}