import java.util.Scanner

object ABC042_A {
  def main(args:Array[String]) {
    val sc = new 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")
    }
  }
}