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