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