#include<stdio.h>

int main(void){
  int a,b,c;
  
  scanf("%d",&a);
  scanf("%d",&b);
  
  if(a < 10)
  {
      if(b < 10)
      {
          a * b = c;
      }
      else
      {
          c = -1;
      }
      
  }
  else
  {
      c = -1;
  }

  printf("%d\n",c);

  return 0;
} 
  