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