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










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