#include <bits/stdc++.h>
using namespace std;
template <class T>
using pql = priority_queue<T, vector<T>>;
template <class T>
using pq = priority_queue<T, vector<T>, greater<T>>;
struct node {
  int64_t to;
  int64_t length;
};
vector<int64_t> divisor(int64_t n) {
  vector<int64_t> ret;
  for (int64_t i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      ret.push_back(i);
      if (i * i != n) ret.push_back(n / i);
    }
  }
  return (ret);
}
int dx8[8] = {0, -1, -1, -1, 0, 1, 1, 1};
int dy8[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
struct datas {
  int64_t max;
  int64_t size;
};
int main(void) {
  int64_t a, b;
  cin >> a >> b;
  if (a < 1 || 9 < a) {
    cout << -1 << endl;
    return 0;
  }
  if (b < 1 || 9 < b) {
    cout << -1 << endl;
  }
  cout << a * b << endl;
}
