#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int A;
  int B;
  cin >> A;
  cin >> B;
  if (A + B >= 18) {
    cout << -1 << endl;
  } else if (A + B < 18) {
    cout << A * B << endl;
  }
  return 0;
}
