program main
	implicit none
    integer::a,b,c
    read(*,*) a,b,c
    if(a<c .and. c<b)then
    	write(*,*) 'Yes'
    else if(b<c .and. c<a)then
    	write(*,*) 'Yes'
    else
    	write(*,*) 'No'
    end if
    stop
end program main