LearnPy Hub
← If…Else problems
Hard

How Do Two Intervals Meet?

Read two closed intervals a b and c d (a ≤ b, c ≤ d). Print same if they are identical, contained if one lies completely inside the other, touching if they share exactly one end point, overlapping if they share more than one point otherwise, or disjoint.

Input

Two lines.

Output

One word.

Sample 1

Input
1 5
5 9
Output
touching

Sample 2

Input
1 5
6 9
Output
disjoint
solution.py
Output appears here
How Do Two Intervals Meet? · Python practice problem · LearnPy Hub