#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long A, B;
  cin >> A >> B;
  if (1 <= (A * B) && (A * B) <= 9) {
    printf("%d\n", A * B);
  } else {
    printf("-1\n");
  }
  return;
}
int main() {
  solve();
  return 0;
}
