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