#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  if (1 <= a <= 20 && 1 <= b <= 20 && a != 5 && b != 10) {
    cout << a * b;
  }
  if (a == 5 && b == 10) {
    cout << "-1";
  }
  return 0;
}
