function Main(input) {
	var input = input.split(" ");
  	if(input[0] < 1 || input[0] > 9 || input[1] < 1 || input[1] > 9){
    	console.log(-1)
    }else{
		console.log(input[0]*input[1]);
    }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));