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