1050 最短距离的两点


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

给出一些整数对,它们表示平面上的点,求所有这些点中距离最近的两个点。结构为:每组数据的第一行只有一个整数N,表示后面有N个点。求这些点中的两点,以表明该两点是所有点中距离最短的。若N为0,则表示输入结束。

Sample

Input

4
1 2
0 0
3 6
7 2
3
1 3
3 1
0 0
0

Output

(1,2) (0,0)
(1,3) (3,1)

Comments

There are no comments at the moment.