program sample
    implicit none
  
    integer(8) :: i,j,m,n,a,b,c
    integer(8),allocatable :: x(:),y(:)
  
    read(*,*) a,b,c
   if ((a-c)*(b-c)<0)then
    write(*,*)'Yes'
   else
    write(*,*)'No'
   endif
   
        
    stop
end program sample
  

