#include <bits/stdc++.h>
using namespace std;
int A, B;
int main() {
  cin >> A >> B;
  if (A > 1 && A < 9 && B > 1 && B < 9) {
    cout << A * B << "\n";
  } else {
    cout << -1 << "\n";
  }
  return 0;
}
