#include<stdio.h>

/

//qsort(pa,n,sizeof(int),(int(*)(const void* ,const void*))cmp);

int main(void){
  int a,b;
  scanf("%d%d",&a,&b);
  if((a>=1&&a<=9)&&(b>=1&&b<=9))
  printf("%d",a*b);
  else
  printf("%d",-1);
  return 0;
}
