#include <bits/stdc++.h>
using namespace std;
long long N, A, B;
int main() {
  ios::sync_with_stdio(false);
  cin >> A >> B;
  if (1 <= A <= 9 and 1 <= B <= 9)
    cout << A * B;
  else
    cout << "-1";
  return 0;
}
