Time limit
2s
Memory limit
128 MB
A very large sheet of paper is identified with the XY coordinate plane. Dasom drew N straight lines on it. Each input row gives two distinct points, and the full straight line passing through those points is drawn.
The drawn lines partition the plane into regions. Every bounded region in a line arrangement is a convex polygon whose interior is not crossed by any drawn line. Given the two points that determine each line, compute how many such polygonal regions are formed.
The first line contains the number of lines N. N is a positive integer not greater than 50.
Each of the next N lines contains four integers x1, y1, x2, y2: the coordinates of two distinct points on one line, in order. Every coordinate is between -10,000 and 10,000 inclusive. No input line description is repeated exactly.
Print the number of polygonal regions.