#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1000000007;
const long long int INF = 1001001001001001000;
int main() {
  int a, b;
  cin >> a >> b;
  if (a >= 10 || b >= 10)
    cout << -1 << endl;
  else
    cout << a * b << endl;
  return 0;
}
