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