A1, A2, A3, A4 = gets.split.map(&:to_i) if A1 < A2 && A3 > A4 puts 'YES' else puts 'NO' end