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