object ABC042_A extends App {
  val sc = new java.util.Scanner(System.in)
  val a, b, c = sc.nextInt()

  if ((a == b && a < c) || (b == c && a > b) || (c == a && a < b)) {
    print("YES")
  } else {
    print("NO")
  }
}