'use strict'
function Main(input){
  input=input.trim().split(/\s+/).map(x=>x-0);
  var result=((input[0]-input[2])*(input[1]-input[2])<0);
  var ans=result:'Yes':'No';
  console.log(ans);
}

Main(require('fs').readFileSync('/dev/stdin','utf8'));