#include <bits/stdc++.h>
using namespace std;
long long n, a, b, ans = 1e15;
int main() {
  ios::sync_with_stdio(false);
  cin >> a >> b;
  if (a == 10 or a == 20 or b == 10 or b == 20)
    cout << "-1";
  else
    cout << a * b;
  return 0;
}
