#include <bits/stdc++.h>
int main() {
  int a, b, ret;
  std::cin >> a >> b;
  if (!(1 <= a <= 9) || !(1 <= b <= 9)) {
    ret = -1;
  } else {
    ret = a * b;
  }
  std::cout << ret << std::endl;
  return 0;
}
