#include <bits/stdc++.h>
using namespace std;
template <class T>
void cout_vec(const vector<T> &vec1) {
  for (long long i = 0; i < long long(vec1.size()); i++) {
    cout << vec1[i] << ' ';
  }
  cout << '\n';
}
const long long mod = 1e9 + 7;
long long gcd(long long a, long long b) {
  long long r;
  while ((r = a % b)) {
    a = b;
    b = r;
  }
  return b;
}
int main() {
  int A, B;
  cin >> A >> B;
  if (A < 10 && B < 10) {
    cout << A * B << endl;
  } else {
    cout << -1 << endl;
  }
  return 0;
}
