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