#include <bits/stdc++.h>
using namespace std;
int A, B;
string huka = "-1";
int main(void) {
  cin >> A >> B;
  if (A > 9) {
    cout << huka << endl;
    return 1;
  }
  if (B > 9) {
    cout << huka << endl;
    return 1;
  }
  cout << A * B << endl;
}
