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