#K14761. Room Booking Request

    ID: 24207 Type: Default 1000ms 256MiB

Room Booking Request

Room Booking Request

You are given a booking system where each booking request is represented by a time interval \( (s, e) \), where \( s \) is the start time and \( e \) is the end time (both are integers). A booking request can be approved only if it does not conflict with any previously approved booking.

Two bookings \( (s_1, e_1) \) and \( (s_2, e_2) \) are non-conflicting if and only if \( e_1 \leq s_2 \) or \( s_1 \geq e_2 \). Otherwise, they conflict.

Given \( n \) booking requests in order, process each request sequentially and output "Yes" if the booking is approved, and "No" if it is denied due to a conflict.

Input/Output Format: The input will be provided from standard input, and the output should be printed to standard output.

inputFormat

The first line contains a single integer \( n \) representing the number of booking requests. The next \( n \) lines each contain two integers \( s \) and \( e \) representing the start and end times of a booking request.

outputFormat

Output \( n \) lines where each line is either "Yes" if the booking is approved or "No" if it is denied.

## sample
1
1 3
Yes

</p>