#C11655. Find Free Time Slots

    ID: 40995 Type: Default 1000ms 256MiB

Find Free Time Slots

Find Free Time Slots

You are given a day that starts at time \(0\) and ends at time \(1440\) minutes (i.e., the total minutes in a day). There are \(n\) events scheduled during the day. Each event is represented by its start time and end time (in minutes). The events are given in chronological order (i.e., sorted by start time).

Your task is to determine all the free time slots available in the day. A free time slot is any interval when no events are scheduled. If there is no free time slot, output "None".

Note: Read the input from stdin and write the output to stdout.

inputFormat

The first line contains a single integer \(n\) representing the number of events. The following \(n\) lines each contain two integers \(s\) and \(e\) (\(0 \leq s < e \leq 1440\)), representing the start and end time of an event.

It is guaranteed that the events are given in increasing order of start time.

outputFormat

If there are free time slots, print each free slot on a separate line as two space-separated integers: the start and end time of the free interval. If there is no free time slot, print a single line with the string "None".

## sample
1
0 1440
None

</p>