https://www.acmicpc.net/problem/17371
import java.io.*;
import java.util.*;
import java.util.List;
class Main {
static BufferedReader br;
static BufferedWriter bw;
static class Point {
int x, y;
public Point(int x, int y) {
this.x = x;
this.y = y;
}
}
static int N;
static List<Point> arr = new ArrayList<>();
static void solve() throws IOException {
int minInd = -1;
double minVal = Double.MAX_VALUE;
for (int i = 0; i < arr.size(); i++) {
double maxVal = 0;
for (int j = 0; j < arr.size(); j++) {
if (i == j) continue;
Point A = arr.get(i);
Point B = arr.get(j);
double dist = Math.sqrt(Math.pow(Math.abs(A.x - B.x), 2) + Math.pow(Math.abs(A.y - B.y), 2));
maxVal = Math.max(maxVal, dist);
}
if (maxVal < minVal) {
minInd = i;
minVal = maxVal;
}
}
bw.write(arr.get(minInd).x + " " + arr.get(minInd).y + "\n");
}
static void input() throws IOException {
bw = new BufferedWriter(new OutputStreamWriter(System.out));
br = new BufferedReader(new InputStreamReader(System.in));
N = Integer.parseInt(br.readLine());
for (int i = 0; i < N; i++) {
StringTokenizer st = new StringTokenizer(br.readLine());
int x = Integer.parseInt(st.nextToken());
int y = Integer.parseInt(st.nextToken());
arr.add(new Point(x, y));
}
}
public static void main(String[] args) throws IOException {
input();
solve();
bw.flush();
}
}