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