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