#include <bits/stdc++.h>
const int sz = 10000;
using namespace std;
int clue();
int result();
void show();
bool check(int n) {
  for (int i = 2; i * i <= n; ++i) {
    if (n % i == 0) return false;
  }
  return true;
}
bool cmp(int p, int q) { return p > q; }
int main() {
  int t;
  t = 1;
  while (t-- > 0) {
    clue();
  }
  return 0;
}
int clue() {
  int a, b;
  cin >> a >> b;
  (a * b <= 81) ? cout << a * b << endl : cout << -1 << endl;
  return 0;
}
