#include <bits/stdc++.h>
int main(void) {
  int A, B, C;
  C = 0;
  scanf("%d %d", &A, &B);
  printf("入力値 A=%d,B=%d", A, B);
  if (0 < A < 10 && 0 < B < 10) {
    C = A * B;
    printf("%d", C);
  } else {
    C = -1;
    printf("%d", C);
  }
  return 0;
}
