function main(input) {
  const s = input.split(' ')
  
  const n1 = parseInt(s[0], 10)
  const n2 = parseInt(s[1], 10)
  const n3 = parseInt(s[2], 10)
  
  if (n1 < n3) {
    console.log(n3 <= n2 ? "Yes" : "No")
  } else if (n1 > n3) {
    console.log(n3 >= n2 ? "Yes" : "No")
  } else {
    console.log("Yes")
  }
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));