#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
int main() {
  int a, b;
  std::cin >> a >> b;
  if ((a > 0 && a < 10) || (b > 0 && b < 10)) {
    std::cout << a * b << endl;
  } else {
    std::cout << "-1" << endl;
  }
  return 0;
}
