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