function main(input) {
  input = input.split(" ");
  
  var first = Number.parseInt(input[0]);
  var second = Number.parseInt(input[1]);
  
  if((typeof first !== "number" ||
     typeof second !== "number") ||
     (first < 2 || first > 10) || 
    (second < 2 || second > 10)) {
  		return console.log(-1);
  }
  return console.log(first * second);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));