import java.util.*;
fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = Scanner(System.`in`)
    ans(sc,n)
}
 
fun ans(sc:Int, n:Int):Unit{
    if(sc in 1..9){
        if(n in 1..9){
          println(sc * n)       
        }
    }else{
    	println(-1)
    }
}