extension String: CollectionType {}
let num: [Int] = readLine()!.split(" ").map { Int($0)! }

var start = num[0]; var end = num[1]
if( num[0] > num[1] ){ 
  start = num[1]
  end = num[0]
}

var out = "No"
for i in start ... end {
  if( i == num[2] ) {
    out = "Yes"
    break
  }
}

print( out )
