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