import java.net.Socket
import java.util.Scanner

import scala.math._

object Main extends App {

  val sc = new Scanner(System.in)
  val A,B = sc.nextInt()

  if(1<=A && A<=9 && 1<=B && B<=9) println(A*B) else println(-1)

}


