New update is available. Click here to update.

Morning Walk

Posted: 2 Jul, 2021
Difficulty: Moderate


Try Problem

Every morning, Alex and Bob go for their regular morning walk. There are some fixed paths for both of them. Alex starts at point A and goes till point B, and Bob starts at point C and goes till point D. Given the values of A, B, C, and D, can you tell whether they will meet at a point or intersect or never meet each other?

You will output a string containing:

“Never” if they never meet.
“Point” if they meet at a point.
“Intersect” if they intersect each other.

For Example:

For A = 1, B = 3, C = 5, D = 10

They will never meet as their paths have no common points.
Input Format:
The first line contains a single integer ‘T’ denoting the number of test cases to be run. Then the test cases follow.
The first line of each test case contains four space-separated integers representing A, B, C, D.
Output Format:
For each test case, print a string according to the above conditions.
Output for each test case will be printed in a separate line.
You are not required to print anything, it has already been taken care of. Just implement the function.
1 <= T <= 10^4
-10^6 <= A, B, C, D <= 10^9

Time Limit: 1 sec.