function main(input) {
  var a = parseInt(input[0],10)
  var b = parseInt(input[1],10)
  if(a <= 9 && b <= 9) {
    console.log("%d",a*b);
  }else{
    console.log("-1")
  }
}

















main(require('fs').readFileSync('/dev/stdin','UTF-8'));