function Main(input){
  
  var str = input.trim().split(" ");
  var a = parseInt(str[0],10);
  var b = parseInt(str[1],10);
  var c = parseInt(str[2],10);
  if(a<b&&a<c&&c<b){
    console.log("Yes");}
  else if(b<a&&b<c&&c<a){
     console.log("Yes");}
  else{
 console.log("No");}

  
  
  
}//function end
 
Main(require("fs").readFileSync("/dev/stdin", "utf8"));