'use strict'
function Main(input) {
	input = input.split(' ');
  	let a = input[0];
  	let b = input[1];
	let sum = a*b;
  	let conditionA = a >= 1 && a <= 9;
  	let conditionB = b >= 1 && b <= 9;
  	if (conditionA && conditionB) {
    	console.log(sum);
    } else {
    	console.log('-1')
    }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
