#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  int sum = 0;
  cin >> a >> b;
  if (a * b <= 81) {
    sum = a * b;
  } else {
    sum = -1;
  }
  cout << sum << endl;
  return 0;
}
