#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int a, b;
  cin >> a >> b;
  if (a < 1 || a > 10 || b < 1 || b > 10)
    cout << -1;
  else
    cout << a * b;
}
