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