	
import java.util.Scanner;
	publicclassMain{
	publicstaticvoid main(String[] args){
	Scanner sc =newScanner(System.in);
	int a = sc.nextInt();
	int b = sc.nextInt();
	if(a<=9&& b<=9){
	System.out.println(a*b);
	}else{
	System.out.println(-1);
	}
	}
	}



