Program Tenka2019A

integer a,b,c

read(*,*) a,b,c

if (a<b) then
 if (a<c .and. c<b) then
  write(*,*) 'Yes'
 else
  write(*,*) 'No'
 end if
else
 if (b<c .and. c<a) then
  write(*,*) 'Yes'
 else
  write(*,*) 'No'
 end if
end if

stop
end