var input = require("fs").readFileSync("/dev/stdin", "utf8");

var words = input.split(' ');
var A = Number(words[0]);
var B = Number(words[1]);

var result;
if (A >= 10 || B >= 10) {
    result = -1;
} else {
    result = A * B;
}
console.log(result);
