#include <bits/stdc++.h>
using namespace std;
const long long M = 1e9 + 7;
const double const_PI = 3.1415926, const_e = 2.7182818;
long long powMod(long long a, long long b, long long m) {
  long long x = 1;
  while (b > 0) {
    if (b & 1) x = (x * a) % m;
    a = (a * a) % m;
    b >>= 1;
  }
  return x;
}
long long nCr(long long n, long long r, long long m) {
  if (n < r) return 0;
  long long res = 1, rem = 1;
  for (long long i = n - r + 1; i <= n; i++) res = (res * i) % m;
  for (long long i = 2; i <= r; i++) rem = (rem * i) % m;
  return (res * powMod(rem, m - 2, m)) % m;
}
long long modInverse(long long a, long long m) {
  a = a % m;
  for (long long x = 1; x < m; ++x) {
    if ((a * x) % m == 1) return x;
  }
  return -1;
}
long long gcdExtended(long long a, long long b, long long *x, long long *y) {
  if (b == 0) {
    *x = 1, *y = 0;
    return a;
  }
  long long x1, y1;
  long long gcd = gcdExtended(b, a % b, &x1, &y1);
  *x = y1, *y = x1 - (floor(a / b) * y1);
  return gcd;
}
long long factorial(long long n) {
  if (n == 1) return 1;
  return sqrt(2 * const_PI * n) * pow((n / const_e), n);
}
vector<bool> sieve(long long n) {
  long long sqrtn = sqrt(n);
  vector<bool> is_prime(n + 1, true);
  for (long long i = 3; i <= sqrtn; i += 2) {
    if (is_prime[i]) {
      long long increment = i + i;
      for (long long j = i * i; j <= n; j += increment) is_prime[j] = false;
    }
  }
  return is_prime;
}
vector<vector<long long> > matMul(vector<vector<long long> > A,
                                  vector<vector<long long> > B) {
  vector<vector<long long> > C(A.size(), vector<long long>(B[0].size()));
  for (long long i = 0; i < A.size(); ++i) {
    for (long long j = 0; j < B[0].size(); ++j) {
      C[i][j] = 0;
      for (long long k = 0; k < B.size(); ++k)
        C[i][j] = (C[i][j] + ((A[i][k] * B[k][j]) % M)) % M;
    }
  }
  return C;
}
vector<vector<long long> > matPow(vector<vector<long long> > A, long long p) {
  if (p == 1) return A;
  if (p & 1)
    return matMul(A, matPow(A, p - 1));
  else {
    vector<vector<long long> > C = matPow(A, p / 2);
    return matMul(C, C);
  }
}
vector<long long> zFunction(string s) {
  long long n = s.size(), L = 0, R = 0;
  vector<long long> z(n);
  for (long long i = 1; i < n; ++i) {
    if (i > R) {
      L = R = i;
      while (R < n && s[R - L] == s[R]) R++;
      z[i] = R - L;
      R--;
    } else {
      long long k = i - L;
      if (z[k] < R - i + 1)
        z[i] = z[k];
      else {
        L = i;
        while (R < n && s[R - L] == s[R]) R++;
        z[i] = R - L;
        R--;
      }
    }
  }
  return z;
}
vector<long long> patterMatch(string text, string pattern) {
  string key = pattern + '$' + text;
  vector<long long> z = zFunction(key);
  vector<long long> res;
  long long m = pattern.size();
  for (long long i = m + 1; i < key.size(); ++i)
    if (z[i] == m) res.push_back(i - m - 1);
  return res;
}
long long fact[100005], inv[100005];
void nCr_preProcess() {
  fact[0] = inv[0] = 1;
  for (long long i = 1; i < 100005; ++i) {
    fact[i] = (fact[i - 1] * i) % M;
    inv[i] = powMod(fact[i], M - 2, M);
  }
}
long long nCr_query(long long n, long long r, long long M) {
  long long res = 1;
  res = (res * 1ll * fact[n]) % M;
  res = (res * 1ll * inv[r]) % M;
  res = (res * 1ll * inv[n - r]) % M;
  return res;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long a, b;
  cin >> a >> b;
  if (a > 10 || b > 10)
    cout << "-1\n";
  else
    cout << a * b << '\n';
  return 0;
}
