"use strict";
const main = arg => {
  let ans = -1;
  let info = arg.split(" ");
  if(info[0] < 10 && info[1] < 10){
  	ans = info[0] * info[1];
  }
  console.log(ans);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
