#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  int prod = 0;
  if (a >= 1 && a <= 9) {
    if (b >= 1 && b <= 9) {
      prod = a * b;
    }
  }
  if (prod)
    cout << prod << endl;
  else
    cout << -1 << endl;
}
