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