#include <bits/stdc++.h>
using namespace std;
const long long int N = 1e5 + 5;
const long long int mod = 1e9 + 7;
const long long int inf = 2e9;
signed main() {
  long long int a, b;
  cin >> a >> b;
  if (a < 10 && b < 10)
    cout << -1;
  else
    cout << a * b;
  return 0;
}
