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