The Astronomers of the ZiggyZig Planet have an obsession: they constantly observe the sky to find out new star constellations. Star constellations are based on the starlines of the Force. For centuries, they have engraved the drawings of the constellations in the dome of their most sacred shrine and use them to predict the future. Astronomers register the starlines of the Force between stars whenever they are detected by an ancient device called the Forssometer. A hard problem that astronomers have always faced is that starlines of the Force sometimes change from time to time, and this makes it difficult to keep the constellation map always up to date. Any- way, they always have manage to make the job perfectly, in particular, the number of different constellations observed at each time must be known at all times. There is an ancient law that says that whenever a starline of the Force exists between two stars then these two starts belong to the same constellation. Your job is to write a program that computes the number of different constellations for the Daily Constellation Report which is issued every morning based on last nights readings. Input The input file contains several test cases. For each case, a sequence of input text lines. The first input line contains a positive integer N indicating the number of starlines to process. After that the input contains N input line, each describing a starline. Each starline is specified by four integers x1 y1 x2 y2 indicating the endpoints (x1,y1) and (x2, y2) of the starline. The coordinate system ranges from 0 to 9999 (including the 0 and 9999). Output For each test case, the output of your program consists of the number of constellations detected in the input, on a line by itself. Sample Input 10 0 0 0 10 0 10 10 10 10 10 10 0 10 0 0 0 1121 2122 2212 1211 1122 2233 Sample Output 2