#include <bits/stdc++.h>
using namespace std;
template <typename T>
T read() {
  T ans(0), flag(1);
  char c(getchar());
  while (!isdigit(c)) {
    if (c == '-') flag = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    ans = ans * 10 + c - 48;
    c = getchar();
  }
  return ans * flag;
}
void file(string s) {
  freopen((s + ".in").c_str(), "r", stdin);
  freopen((s + ".out").c_str(), "w", stdout);
}
int m, n, k;
int main() {
  int a, b;
  cin >> a >> b;
  cout << (a * b <= 10 ? a * b : -1) << endl;
  return 0;
}
