Approximate Circle

아직 제출이 없습니다시간 제한2초메모리 제한512 MB

문제

Consider a set of nn points (x_1x\_{1}y_1y\_{1}), ..., (x_nx\_{n},y_ny\_{n}) on a Cartesian space. Your task is to write a program for regression to a circle x2 +y2 +ax+by+c=0x^2 + y^2 + ax + by + c = 0. In other words, your program should find a circle that minimizes the error. Here the error is measured by the sum over square distances between each point and the circle, which is given by:

_i=1n(x_i2+y_i2+ax_i+by_i+c)2\sum\_{i=1}^{n}{(x\_i^2 + y\_i^2 + ax\_i + by\_i + c) ^2}

입력

The input begins with a line containing one integer nn (3 ≤ nn ≤ 40,000). Then nn lines follow. The ii-th line contains two integers x_ix\_{i} and y_iy\_{i} (0 ≤ x_ix\_{i}, y_iy\_{i} ≤ 1,000), which denote the coordinates of the ii-th point.

You can assume there are no cases in which all the points lie on a straight line.

출력

Print three integers aabb and cc, separated by space, to show the regressed function. The output values should be printed with three digits after the decimal point, and should not contain an error greater than 0.001.