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