#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
long long power(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = res * a % mod;
    b >>= 1;
    a = a * a % mod;
  }
  return res;
}
long long inv(long long x) { return power(x, mod - 2); }
long long gcd(long long a, long long b) {
  if (a % b == 0) return b;
  return gcd(b, a % b);
}
int main() {
  int n;
  int a, b;
  cin >> a >> b;
  if (a < 10 || b < 10)
    cout << a * b;
  else
    cout << -1;
}
