#include <bits/stdc++.h>
using namespace std;
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  string s1, s2;
  if (a == 10 || a == 20 || b == 10 || b == 20)
    cout << "-1" << endl;
  else {
    cout << a * b << endl;
  }
  return 0;
}
