aS = gets.split.map(&:to_i) puts (aS[0] < aS[1]) && (aS[2] > aS[3]) ? :YES : :NO