Company: Goldman Sachs_22july
Difficulty: medium
Lookout Triangle Problem Description During recess in a school garden, a group of children are playing a unique game called 'Lookout Triangle' using ropes. The ropes are laid out in the garden, forming straight line segments. Each rope has two endpoints with integer coordinates. Some ropes may intersect. The children can stand either at the rope endpoints, or at a point of intersection of the ropes. The objective of the game is for the children to stand in a 'Lookout Triangle' which is formed when each pair of the three children can see each other. Two children can see each other only if the straight line segment formed by connected ropes, without changing direction in between. A child blocks the view if they are standing directly between two other children along the same line. Your task is to determine the number of distinct ways to place three children on the ropes such that they form a valid Lookout Triangle. Read the input from STDIN and print the output to STDOUT. Do not print arb