#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B;
  cin >> A >> B;
  bool ans = false;
  for (int i = 1; i <= 9; i++) {
    for (int j = 1; j <= 9; i++) {
      if (A == i && B == j)
        cout << A * B << endl;
      else
        ans = true;
    }
  }
  if (ans) cout << -1 << endl;
}
