eolymp
bolt
Try our new interface for solving problems

Circles

Zaman məhdudiyyəti 2 saniyə
Yaddaşı istafadə məhdudiyyəti 64 MiB

You're given n circles. Each circle is defined by its three distinct points. Calculate the largest possible number of circles having the same radius.

Giriş verilənləri

The first line contains one integer number n (1 n 1400). The next n lines contain six integer numbers each x_1, y_1, x_2, y_2, x_3, y_3 (0 x_i, y_i1000) - the coordinates of three different points that do not belong to one line and define the corresponding circle.

Çıxış verilənləri

Write a single integer - the maximum number of circles having the same radius.

Nümunə

Giriş verilənləri #1
3
0 0 0 1 1 0
0 0 2 0 0 2
1 1 1 2 2 1
Çıxış verilənləri #1
2
Mənbə 2013 Yandex.Algorithm, Test Round, June 27