#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vl = vector<long long>;
using vll = vector<vector<long long>>;
using vs = vector<string>;
using vc = vector<char>;
using vcc = vector<vector<char>>;
using vm = vector<short>;
using vmm = vector<vector<short>>;
using pii = pair<int, int>;
using psi = pair<string, int>;
using ld = long double;
using ull = unsigned long long;
ll gcd(ll a, ll b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
ll box(double a) {
  ll b = a;
  return b;
}
ll fff(double a) {
  ll b = a + 0.5;
  return b;
}
ll sum(ll n) {
  if (n == 0) {
    return 0;
  }
  int s = sum(n - 1);
  return s + n;
}
bool prime(ll num) {
  if (num < 2)
    return false;
  else if (num == 2)
    return true;
  else if (num % 2 == 0)
    return false;
  double sqrtNum = sqrt(num);
  for (int i = 3; i <= sqrtNum; i += 2) {
    if (num % i == 0) {
      return false;
    }
  }
  return true;
}
int main() {
  ll a, b;
  cin >> a >> b;
  if (a < 10 || b < 10) {
    cout << a * b << endl;
  } else
    cout << -1 << endl;
}
