import strscans let (_, a, b, c, d) = stdin.readAll.scanTuple"$i $i $i $i" if a < b and c > d: echo "YES" else: echo "NO"