import java.util.LinkedHashMap; import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); LinkedHashMap<Integer,String>map=new LinkedHashMap<>(); double min=Double.MAX_VALUE;int a=0,b=0; String[]c;double x,y,x1,y1,vue; for (int i = 1; i <=n; i++) { x=sc.nextDouble(); y=sc.nextDouble(); for (Integer k :map.keySet()) { c=map.get(k).split(" "); x1=Double.parseDouble(c[0]); y1=Double.parseDouble(c[1]); vue=Math.sqrt((x1-x)*(x1-x)+(y1-y)*(y1-y)); if(vue<min) { min=vue; a=k; b=i; } } map.put(i,x+" "+y); } System.out.println(a+" "+b); } }
0.0分
0 人评分