#include<stdio.h>

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

    return 0;
} 
  