const main = (inputs) => {

  var array = inputs[0].split(" ");
  if(array[0] < 10 && array[1] < 10){
    console.log(array[0] * array[1]);
  }else{
    console.log(-1);
  }
}

main(require('fs').readFileSync('/dev/stdin', 'UTF-8').trim().split("\n"));