#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long t, a, b, n, i;
  cin >> a >> b;
  if (a == 10 || a == 20 || b == 10 || b == 20)
    cout << "-1";
  else
    cout << a * b << "\n";
  return 0;
}
