#include<stdio.h>
int main()
{
	int a,b;
	scanf("%d %d",&a,&b);
	int c;
	c=a*b;
	if(a<=9&&a>=0)
	{
		if(b<=9&&b>=0)
		printf("%d ",c);
		
			else
			printf("-1");
		
	}
	else
	printf("-1");
	return 0;
}