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