Martian spy satellites have taken a photo of an area on the dark
side of the Moon. In this photo, only a lot of light points are
seen in the dark. The Martian general suggests that the points are secret
objects at lunar military bases. He wants to know how many
bases there are on the Moon. The Martians suppose that the bases
are seen at the photo as clusters of light points and satisfy the following property:
the distance between any two objects at the same base is strictly less
than the distance from any object at this base to any object at any other base.
The area on the photo can be assumed flat, and the distance
between objects having in the photo coordinates (A, B) and
(С, D) is assumed to be
sqrt((A – C)2 + (B – D)2).
The input contains several tests separated by an empty line.
The first line of each test contains the number of objects on the
photo N. The next N lines contain coordinates of
the objects, two integers separated by a space per line. Absolute values
of all coordinates do not exceed 104.
After the last test there is an empty line and the number 0.
The sum of all N in the input does not exceed 5 000,
the sum of all N2 does not exceed 400 000,
and the sum of all N3 does not exceed 250 000 000.
For each test, you should output all possible numbers of bases
on the photo in the form of a line of length N consisting of zeros and ones. For example, the line 110 means that there may be one or two bases on the photo, and the line 011 means that there may be two or three bases.
Problem Author: Dmitry Ivankov
Problem Source: Ural SU and Orel STU Contest. Petrozavodsk Summer Session, August 2006