'use strict';

function main(stdin) {
  const input = stdin.split(' ').map(v => parseInt(v, 10));
  const A = input[0];
  const B = input[1];

  let ans = -1;

  if (A <= 9 && B <= 9) ans = A * B;

  console.log(ans);
}

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