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