Point Location Test

medium
https://cses.fi/problemset/task/2189

Input Format

Check Link

Output Format

Check Link

Constraints

Check Link

Example

Input
3
1 1 5 3 2 3
1 1 5 3 4 1
1 1 5 3 3 2
Output
LEFT
RIGHT
TOUCH
Next
Line Segment Intersection

Related Questions