The annual Multi-University Technology Conference is being held in the China Online Convention \& Exhibition Center. As a photographer, your task today is to take photos of people participating in the grand festivity. To make the photo neat, you should make the people in the photo as uniform as possible.
Formally, the exhibition center can be regarded as a two-dimensional plane, and people can be seen as points in the plane. You may orient your camera in an arbitrary direction, and all points representing the people are projected to a line perpendicular to your orientation. You should maximize
$$S = \frac{1}{|P|} \sqrt{\sum_{i \in P} \sum_{j \in P} d(i,j)^2} $$
where $P$ is the current set of people, $d(i,j)$ is the distance between the projected points of the $i$-th and $j$-th persons on the line.
Since the people are of high mobility, you should report the optimal value after each event. There are two types of events:
1. a person appears at Cartesian coordinates $(x, y)$;
2. the person appearing since the $i$-th event disappears now.
Initially, there is no person in the exhibition center.