#include <bits/stdc++.h>
using namespace std;
const long long int INF = 1e18L + 5;
long long int csr(long long int A[], long long int len) {
  set<long long int> s;
  long long int countSmaller[len];
  for (long long int i = len - 1; i >= 0; i--) {
    s.insert(A[i]);
    auto it = s.lower_bound(A[i]);
    countSmaller[i] = distance(s.begin(), it);
  }
  long long int z = 0;
  for (long long int i = 0; i < len; i++) z += countSmaller[i];
  return z;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int T = 1;
  while (T--) {
    long long int a, b;
    cin >> a >> b;
    if (min(a, b) >= 10)
      cout << "-1" << endl;
    else
      cout << a * b << endl;
  }
}
