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