#include <bits/stdc++.h>
using namespace std;
long long findSubarraySum(long long arr[], long long n, long long sum = 0) {
  unordered_map<long long, long long> prevSum;
  long long res = 0;
  long long currsum = 0;
  for (long long i = 0; i < n; i++) {
    currsum += arr[i];
    if (currsum == sum) res++;
    if (prevSum.find(currsum - sum) != prevSum.end())
      res += (prevSum[currsum - sum]);
    prevSum[currsum]++;
  }
  return res;
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long findGCD(long long arr[], long long n) {
  long long result = arr[0];
  for (long long i = 1; i < n; i++) result = gcd(arr[i], result);
  return result;
}
long long powmp(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long a, b;
  cin >> a >> b;
  long long x = a * b;
  if (a < 10 && b < 10)
    cout << x;
  else
    cout << '-1';
}
