The new channel «6+6» has recently skyrocketed in popularity. Major companies, which we'll call , , and , are offering substantial sums to secure a prime time slot for their programs. These programs, while engaging, contain subtle advertisements. The channel's management is worried that the broadcast times for these programs might overlap. Unable to solve this issue themselves, they have enlisted the help of Andriy, who is developing a program to address it.
Each broadcast time is specified by four integers: the start and end hours and minutes. All input data is valid, with hours ranging from to and minutes from to . The end time is always later than the start time. Broadcast times are considered overlapping if they coincide for at least one minute. The program should determine if the broadcast times for , , and overlap and output a specific message:
— No overlap among the broadcast times.
— Only and overlap.
— Only and overlap.
— overlaps with both and , but and do not overlap with each other.
— Only and overlap.
— overlaps with both and , but and do not overlap with each other.
— overlaps with both and , but and do not overlap with each other.
— All three broadcasts overlap at some common time.
— Any other overlapping scenario.
Let's create a program to solve this!
Each of the next three lines contains integers representing the start and end times (hours and minutes) for the broadcasts of companies , , and , respectively.
The program should output a message according to the rules specified above.
Example 1