function Main(input) {
    var args = input.trim().split(' ').map(Number);
/*     for(var i = 0; i < args.length; i++) {
      if(args[i] >= )
    } */
    if(!args[0] <= 9 && args[1] <= 9) {
      console.log(args[0] * args[1]);
    } else {
      console.log('-1');
    }
 }
 
/* var input = `5 10`;
Main(input);
 */  
Main(require("fs").readFileSync("/dev/stdin", "utf8"));