'use strict';
const main = input => {
  input = input[0].split(' ').map(val => parseInt(val));
  const a = input[0], b = input[1];
  if (a < 10 && b < 10) {
    console.log(a*b);
  } else {
    console.log(-1);
    
  }
}
main(require("fs").readFileSync("/dev/stdin", "utf8").split('\n'));