#C7524. Meeting Scheduling Validation

    ID: 51405 Type: Default 1000ms 256MiB

Meeting Scheduling Validation

Meeting Scheduling Validation

You are given a list of existing meetings and a new meeting, each defined by their start and end times. Your task is to determine if the new meeting can be scheduled without overlapping any of the existing meetings.

A meeting interval is represented by two numbers \(s\) and \(e\) where \(s < e\). Two intervals \([s_1, e_1]\) and \([s_2, e_2]\) overlap if and only if \(s_1 < e_2\) and \(s_2 < e_1\). The new meeting can be scheduled if it does not overlap with any of the existing meetings.

Input is provided via standard input and the output should be printed to standard output.

inputFormat

The input begins with an integer \(n\) — the number of existing meetings. The following \(n\) lines each contain two numbers representing the start and end times of an existing meeting. The last line contains two numbers representing the start and end times of the new meeting.

For example:

3
9 10
13 14
15 16
10 11

outputFormat

Output a single line: True if the new meeting can be scheduled without overlapping any existing meeting, or False otherwise.

## sample
3
9 10
13 14
15 16
10 11
True