program sample
	implicit none
    integer :: A,B
    
    read(*,*) A,B
    
    if (A>=10 .or. B>=10) then
    	write(*,*) -1
    else 
    	write(*,*) A*B
    end if
    
    stop
end program sample