The Cybermen and the Daleks have long been the Doctor's main enemies. Everyone knows that both these species enjoy destroying everything they encounter. However, a little-known fact about them is that they both also love taking Turing tests!Heidi designed a series of increasingly difficult tasks for them to spend their time on, which would allow the Doctor enough time to save innocent lives!The funny part is that these tasks would be very easy for a human to solve.The first task is as follows. There are some points on the plane. All but one of them are on the boundary of an axis-aligned square (its sides are parallel to the axes). Identify that point.

The first line contains an integer $$$n$$$ ($$$2 \le n \le 10$$$). Each of the following $$$4n + 1$$$ lines contains two integers $$$x_i, y_i$$$ ($$$0 \leq x_i, y_i \leq 50$$$), describing the coordinates of the next point. It is guaranteed that there are at least $$$n$$$ points on each side of the square and all $$$4n + 1$$$ points are distinct.

Print two integers — the coordinates of the point that is not on the boundary of the square.

NoteIn both examples, the square has four sides $$$x=0$$$, $$$x=2$$$, $$$y=0$$$, $$$y=2$$$.

import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        FastReader input=new FastReader();
        PrintWriter out=new PrintWriter(System.out);
        int T=1;
        while(T-->0)
        {
            int n=input.nextInt();
            int x[]=new int[4*n+1];
            int y[]=new int[4*n+1];
            int minx=Integer.MAX_VALUE;
            int miny=Integer.MAX_VALUE;
            int maxx=Integer.MIN_VALUE;
            int maxy=Integer.MIN_VALUE;
            for(int i=0;i<4*n+1;i++)
            {
                x[i]=input.nextInt();
                y[i]=input.nextInt();
                minx=Math.min(minx,x[i]);
                miny=Math.min(miny,y[i]);
                maxx=Math.max(maxx,x[i]);
                maxy=Math.max(maxy,y[i]);
            }
            int a=0,b=0,c=0,d=0;
            for(int i=0;i<4*n+1;i++)
            {
                if(x[i]==minx)
                {
                    c++;
                }
                else if(x[i]==maxx)
                {
                    d++;
                }
                if(y[i]==miny)
                {
                    a++;
                }
                else if(y[i]==maxy)
                {
                    b++;
                }
            }
            if(a>=n && b>=n && c>=n && d>=n)
            {
                int index=-1;
                for(int i=0;i<4*n+1;i++)
                {
                    if(x[i]!=minx && x[i]!=maxx && y[i]!=miny && y[i]!=maxy)
                    {
                        index=i;
                        break;
                    }
                }
                out.println(x[index]+" "+y[index]);
            }
            else
            {
                if(a<n)
                {
                    int index=-1;
                    for(int i=0;i<4*n+1;i++)
                    {
                        if(y[i]==miny)
                        {
                            index=i;
                            break;
                        }
                    }
                    out.println(x[index]+" "+y[index]);
                }
                else if(b<n)
                {
                    int index=-1;
                    for(int i=0;i<4*n+1;i++)
                    {
                        if(y[i]==maxy)
                        {
                            index=i;
                            break;
                        }
                    }
                    out.println(x[index]+" "+y[index]);
                }
                else if(c<n)
                {
                    int index=-1;
                    for(int i=0;i<4*n+1;i++)
                    {
                        if(x[i]==minx)
                        {
                            index=i;
                            break;
                        }
                    }
                    out.println(x[index]+" "+y[index]);
                }
                else if(d<n)
                {
                    int index=-1;
                    for(int i=0;i<4*n+1;i++)
                    {
                        if(x[i]==maxx)
                        {
                            index=i;
                            break;
                        }
                    }
                    out.println(x[index]+" "+y[index]);
                }
            }
        }
        out.close();
    }
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Rustam Musin (t.me/musin_acm)
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        C1HaidiITestTyuringaLegkaya solver = new C1HaidiITestTyuringaLegkaya();
        solver.solve(1, in, out);
        out.close();
    }

    static class C1HaidiITestTyuringaLegkaya {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.readInt();
            int minX = Integer.MAX_VALUE;
            int minY = Integer.MAX_VALUE;
            int maxX = Integer.MIN_VALUE;
            int maxY = Integer.MIN_VALUE;
            int[] cntX = new int[51];
            int[] cntY = new int[51];
            IntIntPair[] a = in.readIntPairArray(4 * n + 1);
            for (IntIntPair p : a) {
                cntX[p.first]++;
                cntY[p.second]++;
//            minX = Math.min(minX, p.first);
//            minY = Math.min(minY, p.second);
//            maxX = Math.max(maxX, p.first);
//            maxY = Math.max(maxY, p.second);
            }
            for (int x = 0; x <= 50; x++) {
                if (cntX[x] >= n) {
                    minX = Math.min(minX, x);
                    maxX = Math.max(maxX, x);
                }
            }
            for (int y = 0; y <= 50; y++) {
                if (cntY[y] >= n) {
                    minY = Math.min(minY, y);
                    maxY = Math.max(maxY, y);
                }
            }
            for (IntIntPair p : a) {
                boolean fail = false;
                if ((p.first == minX || p.first == maxX)) {
                    fail = p.second < minY || p.second > maxY;
                } else if ((p.second == minY || p.second == maxY)) {
                    fail = p.first < minX || p.first > maxX;
                } else {
                    fail = true;
                }
                if (fail) {
                    out.print(p.first, p.second);
                }
            }
        }

    }

    static class IntIntPair implements Comparable<IntIntPair> {
        public final int first;
        public final int second;

        public IntIntPair(int first, int second) {
            this.first = first;
            this.second = second;
        }

        public boolean equals(Object o) {
            if (this == o) {
                return true;
            }
            if (o == null || getClass() != o.getClass()) {
                return false;
            }

            IntIntPair pair = (IntIntPair) o;

            return first == pair.first && second == pair.second;
        }

        public int hashCode() {
            int result = first;
            result = 31 * result + second;
            return result;
        }

        public String toString() {
            return "(" + first + "," + second + ")";
        }

        public int compareTo(IntIntPair o) {
            int value = Integer.compare(first, o.first);
            if (value != 0) {
                return value;
            }
            return Integer.compare(second, o.second);
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void close() {
            writer.close();
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public IntIntPair[] readIntPairArray(int size) {
            IntIntPair[] result = new IntIntPair[size];
            for (int i = 0; i < size; i++) {
                result[i] = readIntPair();
            }
            return result;
        }

        public IntIntPair readIntPair() {
            int first = readInt();
            int second = readInt();
            return new IntIntPair(first, second);
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Andy Phan
 */
public class c1 {
    public static void main(String[] args) {
        FS in = new FS(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = in.nextInt();
        Point[] p = new Point[4*n+1];
        for(int i = 0; i < 4*n+1; i++) {
            p[i] = new Point(in.nextInt(), in.nextInt());
        }

        outer: for(int i = 0; i < 4*n+1; i++) {
            int minX = 100;
            int minY = 100;
            int maxX = 0;
            int maxY = 0;
            for(int j = 0; j < 4*n+1; j++) {
                if(j == i) continue;
                minX = Math.min(p[j].x, minX);
                minY = Math.min(p[j].y, minY);
                maxX = Math.max(p[j].x, maxX);
                maxY = Math.max(p[j].y, maxY);
            }
            if(maxX-minX != maxY-minY) continue;
            for(int j = 0; j < 4*n+1; j++) {
                if(j == i) continue;
                if(p[j].x == minX || p[j].x == maxX) continue;
                if(p[j].y == minY || p[j].y == maxY) continue;
                continue outer;
            }
            System.out.println(p[i]);
            return;
        }

        out.close();
    }

    static class Point {
        int x, y;

        public Point(int X, int Y) {
            x = X;
            y = Y;
        }

        public String toString() {
            return x + " " + y;
        }
    }

    static class FS {

        BufferedReader in;
        StringTokenizer token;

        public FS(InputStream str) {
            in = new BufferedReader(new InputStreamReader(str));
        }

        public String next() {
            if (token == null || !token.hasMoreElements()) {
                try {
                    token = new StringTokenizer(in.readLine());
                } catch (IOException ex) {
                }
                return next();
            }
            return token.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
    }
}

import java.util.*;
import java.io.*;
import java.math.BigInteger;
public class template {
	public static void main(String[] args) throws Exception {
		FastScanner sc = new FastScanner();
		PrintWriter pw = new PrintWriter(System.out);
		int n =sc.nextInt();
		int[] o = new int[4*n+1];
		int[] p= new int[4*n+1];
		int[] r= new int[51];
		int[] d= new int[51];
		for(int i=0;i<4*n+1;i++) {
			int x=  sc.nextInt();
			int y= sc.nextInt();
			o[i]=x;
			p[i]=y;
			r[x]++;
			d[y]++;
		}
		int sx =-1;
		int ex =-1;
		int sy =-1;
		int ey =-1;
		for(int i=0;i<r.length;i++) {
			if(r[i]>=n) {
				if(sx==-1) {
					sx=i;
				}
				else ex =i;
			}
			if(d[i]>=n) {
				if(sy==-1) {
					sy=i;
				}
				else ey =i;
			}
		}
		boolean[][] x = new boolean[51][51];
		for(int i=sx;i<=ex;i++) {
			x[i][sy]=true;
			x[i][ey]=true;
		}
		for(int i=sy;i<=ey;i++) {
			x[sx][i]=true;
			x[ex][i]=true;
		}
		for(int i=0;i<4*n+1;i++) {
			if(!x[o[i]][p[i]]) {
				pw.println(o[i]+" "+p[i]);
				break;
			}
		}
		pw.close();
	}
}
@SuppressWarnings("all")
class FastScanner {
    BufferedReader br;
    StringTokenizer st;
    public FastScanner(BufferedReader d) {
        br=d;
    }
    public FastScanner(String s) {
        try {
            br = new BufferedReader(new FileReader(s));
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }

    public FastScanner() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String nextToken() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(nextToken());
    }

    long nextLong() {
        return Long.parseLong(nextToken());
    }

    double nextDouble() {
        return Double.parseDouble(nextToken());
    }
}

import java.util.*;
import java.io.*;

public class HeidiAndTheTuringTest {
    public static void main(String[] args) throws IOException
    {
       int N = nextInt();
       int[] xCoords = new int[51];
       int[] yCoords = new int[51];
       int[][] coords = new int[51][2];
       for (int i = 0; i < ((4 * N) + 1); i++)
       {
           int X = nextInt();
           int Y = nextInt();
           xCoords[X]++;
           yCoords[Y]++;
           coords[i] = new int[] {X, Y};
       }
       int bottomX = -1;
       int topX = -1;
       int bottomY = -1;
       int topY = -1;
       for (int i = 0; i < 51; i++)
       {
           if (xCoords[i] > 1 && bottomX == -1)
           {
               bottomX = i;
           }
           if (yCoords[i] > 1 && bottomY == -1)
           {
               bottomY = i;
           }
           if (bottomX != -1)
           {
               if (xCoords[i] > 1)
               {
                   topX = i;
               }
           }
           if (bottomY != -1)
           {
               if (yCoords[i] > 1)
               {
                   topY = i;
               }
           }
       }
       for (int i = 0; i < 51; i++)
       {
           int X = coords[i][0];
           int Y = coords[i][1];
           if (X < topX && X > bottomX && Y != topY && Y != bottomY || Y < topY && Y > bottomY && X != bottomX && X != topX)
           {
               System.out.println(X + " " + Y);
               break;
           } else if (X > topX || X < bottomX || Y > topY || Y < bottomY)
           {
               System.out.println(X + " " + Y);
               break;
           }
       }

    }

    //Template
    private static StringTokenizer line = new StringTokenizer("");
    private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    private static int nextInt() throws IOException
    {
        return Integer.parseInt(nextString());
    }
    private static long nextLong() throws IOException
    {
        return Long.parseLong(nextString());
    }
    private static String nextString() throws IOException
    {
        if (line.hasMoreTokens())
        {
            return line.nextToken();
        } else {
            line = new StringTokenizer(in.readLine());
            return line.nextToken();
        }
    }
    private static String[] nextStringArray() throws IOException
    {
        return in.readLine().split(" ");
    }
    private static int[] nextIntArray() throws IOException
    {
        return Arrays.stream(nextStringArray()).mapToInt(Integer::parseInt).toArray();
    }
}

import java.io.File;
import java.util.Scanner;
import java.util.StringTokenizer;

public class p039 {
	public static void main(String args[]) throws Exception {
		StringTokenizer stok = new StringTokenizer(new Scanner(System.in).useDelimiter("\\A").next());
		StringBuilder sb = new StringBuilder();
		int n = Integer.parseInt(stok.nextToken());
		boolean[][] b = new boolean[51][51];
		int[] x = new int[4*n+1],y=new int[4*n+1];
		for(int i=0;i<4*n+1;i++) {
			x[i]=Integer.parseInt(stok.nextToken());
			y[i]=Integer.parseInt(stok.nextToken());
		}
		for(int i=0;i<50;i++) for(int j=0;j<50;j++) for(int k=2;k<=1+Math.min(50-i,50-j);k++) {
			set(b,i,j,k,true);
			int lx=0,ly=0,tot=0;
			for(int l=0;l<4*n+1;l++) if(!b[x[l]][y[l]]) {tot++;lx=x[l];ly=y[l];}
			set(b,i,j,k,false);
			if(tot==1) exit1(lx,ly);
		}
	}

	private static void set(boolean[][] b,int i,int j,int k,boolean val) {
		for(int l=i;l<i+k-1;l++) b[l][j] = val;
		for(int l=j;l<j+k-1;l++) b[i+k-1][l] =val;
		for(int l=i+k-1;l>i;l--) b[l][j+k-1] =val;
		for(int l=j+k-1;l>j;l--) b[i][l] =val;
	}

	private static void exit1(int i, int j) {
		System.out.println(i+ " "+j);
		System.exit(0);
	}
}

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.InputStreamReader;

public class C11184 {

	public static void main(String[] args) throws Exception {
//		BufferedReader br = new BufferedReader(new FileReader("F:/books/input.txt"));
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		Integer n = Integer.parseInt(br.readLine());
		int[] x = new int[51];
		int[] y = new int[51];
		int[] x1 = new int[4*n+1];
		int[] y1 = new int[4*n+1];
		for (int i = 0; i < 4*n+1; i++) {
			String[] s = br.readLine().split(" ");
			x[Integer.parseInt(s[0])]++;
			y[Integer.parseInt(s[1])]++;
			x1[i] = Integer.parseInt(s[0]);
			y1[i] = Integer.parseInt(s[1]);
		}
		int[] ax = new int[] {-1,-1};
		int[] ay = new int[] {-1,-1};
		for (int i = 0; i < 51; i++) {
			if(x[i]>=n) {
				if(ax[0]==-1) ax[0]=i;
				else ax[1]=i;
			}
			if(y[i]>=n) {
				if(ay[0]==-1) ay[0]=i;
				else ay[1]=i;
			}
		}
		int fx=-1,fy=-1;
		for (int i = 0; i < 4*n+1; i++) {
			if(x1[i]!=ax[0] && x1[i]!=ax[1] && y1[i]!=ay[0] && y1[i]!=ay[1]) {
				fx = x1[i];fy=y1[i];break;
			}
			if(x1[i]<ax[0] || x1[i]>ax[1] || y1[i]<ay[0] || y1[i]>ay[1]) {
				fx = x1[i];fy=y1[i];break;
			}
		}
		System.out.println(fx+" "+fy);
	}

}

import java.io.*;
import java.math.*;
import java.util.*;
import java.util.stream.*;
import java.lang.management.*;
import static java.lang.Math.*;

@SuppressWarnings("unchecked")
public class P1184C1 {

  final static int MIN = Integer.MIN_VALUE, MAX = Integer.MAX_VALUE;
  final static int SHIFT = 6, MASK = (1 << SHIFT) - 1;

  public void run() throws Exception {
    Deque<Integer> xyd = new ArrayDeque();
    for (int n = (nextInt() << 2) + 1; n != 0; xyd.add((nextInt() << SHIFT) | nextInt()), n--);

next_point:
    while (true) { // always finish
      int lx = xyd.peekFirst() >> SHIFT, ly = xyd.pollFirst() & MASK;
      int xl = MAX, yl = MAX, xh = MIN, yh = MIN;

      for (int xy : xyd) {
        xl = min(xl, xy >> SHIFT);
        xh = max(xh, xy >> SHIFT);
        yl = min(yl, xy & MASK);
        yh = max(yh, xy & MASK);
      }

      if ((xh - xl) == (yh - yl)) {
        for (int xy : xyd) {
          int x = xy >> SHIFT, y = xy & MASK;

          if ((x != xl) && (y != yl) && (x != xh) && (y != yh)) {
            xyd.add((lx << SHIFT) | ly);
            continue next_point;
          }
        }

        println(lx + " " + ly);
        break;
      }

      xyd.add((lx << SHIFT) | ly);
    }
  }

  public static void main(String... args) throws Exception {
    br = new BufferedReader(new InputStreamReader(System.in));
    pw = new PrintWriter(new BufferedOutputStream(System.out));
    new P1184C1().run();
    br.close();
    pw.close();
    System.err.println("\n[Time : " + (System.currentTimeMillis() - startTime) + " ms]");
    long gct = 0, gcc = 0;
    for (GarbageCollectorMXBean garbageCollectorMXBean : ManagementFactory.getGarbageCollectorMXBeans()) {
      gct += garbageCollectorMXBean.getCollectionTime();
      gcc += garbageCollectorMXBean.getCollectionCount();
    }
    System.err.println("[GC time : " + gct + " ms, count = " + gcc + "]");
  }

  static long startTime = System.currentTimeMillis();
  static BufferedReader br;
  static PrintWriter pw;
  StringTokenizer stok;

  String nextToken() throws IOException {
    while (stok == null || !stok.hasMoreTokens()) {
      String s = br.readLine();
      if (s == null) { return null; }
      stok = new StringTokenizer(s);
    }
    return stok.nextToken();
  }

  void print(byte b) { print("" + b); }
  void print(int i) { print("" + i); }
  void print(long l) { print("" + l); }
  void print(double d) { print("" + d); }
  void print(char c) { print("" + c); }
  void print(Object o) {
    if (o instanceof int[]) { print(Arrays.toString((int [])o));
    } else if (o instanceof long[]) { print(Arrays.toString((long [])o));
    } else if (o instanceof char[]) { print(Arrays.toString((char [])o));
    } else if (o instanceof byte[]) { print(Arrays.toString((byte [])o));
    } else if (o instanceof short[]) { print(Arrays.toString((short [])o));
    } else if (o instanceof boolean[]) { print(Arrays.toString((boolean [])o));
    } else if (o instanceof float[]) { print(Arrays.toString((float [])o));
    } else if (o instanceof double[]) { print(Arrays.toString((double [])o));
    } else if (o instanceof Object[]) { print(Arrays.toString((Object [])o));
    } else { print("" + o); }
  }
  void printsp(int [] a) { for (int i = 0, n = a.length; i < n; print(a[i] + " "), i++); }
  void print(String s) { pw.print(s); }
  void println() { println(""); }
  void println(byte b) { println("" + b); }
  void println(int i) { println("" + i); }
  void println(long l) { println("" + l); }
  void println(double d) { println("" + d); }
  void println(char c) { println("" + c); }
  void println(Object o) { print(o); println(); }
  void println(String s) { pw.println(s); }
  int nextInt() throws IOException { return Integer.parseInt(nextToken()); }
  long nextLong() throws IOException { return Long.parseLong(nextToken()); }
  double nextDouble() throws IOException { return Double.parseDouble(nextToken()); }
  char nextChar() throws IOException { return (char) (br.read()); }
  String next() throws IOException { return nextToken(); }
  String nextLine() throws IOException { return br.readLine(); }
  int [] readInt(int size) throws IOException {
    int [] array = new int [size];
    for (int i = 0; i < size; i++) { array[i] = nextInt(); }
    return array;
  }
  long [] readLong(int size) throws IOException {
    long [] array = new long [size];
    for (int i = 0; i < size; i++) { array[i] = nextLong(); }
    return array;
  }
  double [] readDouble(int size) throws IOException {
    double [] array = new double [size];
    for (int i = 0; i < size; i++) { array[i] = nextDouble(); }
    return array;
  }
  String [] readLines(int size) throws IOException {
    String [] array = new String [size];
    for (int i = 0; i < size; i++) { array[i] = nextLine(); }
    return array;
  }

  int gcd(int a, int b) {
    if (a == 0) return Math.abs(b); if (b == 0) return Math.abs(a);
    a = Math.abs(a); b = Math.abs(b);
    int az = Integer.numberOfTrailingZeros(a), bz = Integer.numberOfTrailingZeros(b);
    a >>>= az; b >>>= bz;
    while (a != b) {
      if (a > b) { a -= b; a >>>= Integer.numberOfTrailingZeros(a); }
            else { b -= a; b >>>= Integer.numberOfTrailingZeros(b); }
    }
    return (a << Math.min(az, bz));
  }

  long gcd(long a, long b) {
    if (a == 0) return Math.abs(b); if (b == 0) return Math.abs(a);
    a = Math.abs(a); b = Math.abs(b);
    int az = Long.numberOfTrailingZeros(a), bz = Long.numberOfTrailingZeros(b);
    a >>>= az; b >>>= bz;
    while (a != b) {
      if (a > b) { a -= b; a >>>= Long.numberOfTrailingZeros(a); }
            else { b -= a; b >>>= Long.numberOfTrailingZeros(b); }
    }
    return (a << Math.min(az, bz));
  }

  void shuffle(int [] a) { // RANDOM shuffle
    Random r = new Random();
    for (int i = a.length - 1, j, t; i >= 0; j = r.nextInt(a.length), t = a[i], a[i] = a[j], a[j] = t, i--);
  }

  void shuffle(int [] a, int m) { // QUICK shuffle
    for (int i = 0, n = a.length, j = m % n, t; i < n; t = a[i], a[i] = a[j], a[j] = t, i++, j = (i * m) % n);
  }

  void shuffle(long [] a) {
    Random r = new Random();
    for (int i = a.length - 1; i >= 0; i--) {
      int j = r.nextInt(a.length);
      long t = a[i]; a[i] = a[j]; a[j] = t;
    }
  }

  void shuffle(Object [] a) {
    Random r = new Random();
    for (int i = a.length - 1; i >= 0; i--) {
      int j = r.nextInt(a.length);
      Object t = a[i]; a[i] = a[j]; a[j] = t;
    }
  }

  int [] sort(int [] a) {
    final int SHIFT = 16, MASK = (1 << SHIFT) - 1, SIZE = (1 << SHIFT) + 1;
    int n = a.length, ta [] = new int [n], ai [] = new int [SIZE];
    for (int i = 0; i < n; ai[(a[i] & MASK) + 1]++, i++);
    for (int i = 1; i < SIZE; ai[i] += ai[i - 1], i++);
    for (int i = 0; i < n; ta[ai[a[i] & MASK]++] = a[i], i++);
    int [] t = a; a = ta; ta = t;
    ai = new int [SIZE];
    for (int i = 0; i < n; ai[(a[i] >> SHIFT) + 1]++, i++);
    for (int i = 1; i < SIZE; ai[i] += ai[i - 1], i++);
    for (int i = 0; i < n; ta[ai[a[i] >> SHIFT]++] = a[i], i++);
    return ta;
  }

  void flush() {
    pw.flush();
  }

  void pause() {
    flush(); System.console().readLine();
  }
}

import java.io.*;
import java.util.*;
public class C{
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskE solver = new TaskE();
        solver.solve(1, in, out);
        out.flush();out.close();
    }
        static class TaskE {
            class pair{
                int F, S;
                pair(int a, int b){F = a; S = b;}
            }
            final int max = 100;
            boolean range(int x, int l , int r){
                if(x < l || x > r) return false;
                return true;
            }
           public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int t;
            pair p[] = new pair[t = 4 * n + 1];
            for(int i = 0; i <= 4 * n; i++){
                p[i] = new pair(in.nextInt(), in.nextInt());
            }
            for(int i = 0; i < t; i++){
                int minx = max, maxx = - max , miny = max , maxy = -max;

                for(int j = 0; j < t; j++){
                    if(i == j) continue;
                    minx = Math.min(minx , p[j].F);
                    maxx = Math.max(maxx , p[j].F);
                    miny = Math.min(miny , p[j].S);
                    maxy = Math.max(maxy , p[j].S);
                }

                if(maxx - minx != maxy - miny)continue;

                int c = 0; boolean is = false;
                for(int j = 0; j < t; j++){
                    if(range(p[j].F , minx , maxx) && (p[j].S == miny || p[j].S == maxy)){continue;}
                    if(range(p[j].S , miny , maxy) && (p[j].F == minx || p[j].F == maxx)){continue;}
                    if(i == j){
                        is = true;
                    }else{
                        c++;
                    }
                }

                if(c == 0 && is){
                    out.println(p[i].F + " " + p[i].S); return;
                }
            }
          }
//         pair ja[][];long w[];int from[],to[],c[];
//             void make(int n,int m,InputReader in){
//              ja=new pair[n+1][];w=new long[m];from=new int[m];to=new int[m];c=new int[n+1];
//              for(int i=0;i<m;i++){
//               int u=in.nextInt(),v=in.nextInt();long wt=in.nextLong();
//               c[u]++;c[v]++;from[i]=u;to[i]=v;w[i]=wt;
//              }
//              for(int i=1;i<=n;i++){
//               ja[i]=new pair[c[i]];c[i]=0;
//              }
//              for(int i=0;i<m;i++){
//               ja[from[i]][c[from[i]]++]=new pair(to[i],w[i]);
//               ja[to[i]][c[to[i]]++]=new pair(from[i],w[i]);
//              }
//             }
//        int[] radixSort(int[] f){ return radixSort(f, f.length); }
//    int[] radixSort(int[] f, int n)
//    {
//        int[] to = new int[n];
//        {
//            int[] b = new int[65537];
//            for(int i = 0;i < n;i++)b[1+(f[i]&0xffff)]++;
//            for(int i = 1;i <= 65536;i++)b[i]+=b[i-1];
//            for(int i = 0;i < n;i++)to[b[f[i]&0xffff]++] = f[i];
//            int[] d = f; f = to;to = d;
//        }
//        {
//            int[] b = new int[65537];
//            for(int i = 0;i < n;i++)b[1+(f[i]>>>16)]++;
//            for(int i = 1;i <= 65536;i++)b[i]+=b[i-1];
//            for(int i = 0;i < n;i++)to[b[f[i]>>>16]++] = f[i];
//            int[] d = f; f = to;to = d;
//        }
//        return f;
//    }
    }
    static class InputReader {
        BufferedReader br;
        StringTokenizer st;
        public InputReader(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream));
            st = null;
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return null;
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

        boolean hasMoreTokens() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return false;
                st = new StringTokenizer(s);
            }
            return true;
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong() {
            return Long.parseLong(next());
        }
        public double nextDouble() {
            return Double.parseDouble(next());
        }
    }
}

import java.util.*;
import java.lang.*;
import java.io.*;
import static java.lang.Math.*;

public class Solution{

    static StreamTokenizer in1 = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));

    static int nextInt() throws IOException {
        in1.nextToken();
        return (int)in1.nval;
    }

    public static void main (String[] args) throws IOException {
        int n = nextInt(), x[] = new int[51], y[] = new int[51];
        Pair a[] = new Pair[4*n+1];

        boolean p[][] = new boolean[51][51];

        for(int i = 0; i<4*n+1; i++){
            a[i] = new Pair(nextInt(), nextInt());
            x[a[i].x]++;
            y[a[i].y]++;
            p[a[i].y][a[i].x] = true;
        }

        for(int xl = 0; xl<51; xl++){
            if(x[xl]<n) continue;
            for(int xr = 50; xr>=0; xr--){
                if(x[xr]<n) continue;
                for(int yl = 0; yl<51; yl++){
                    if(y[yl]<n) continue;
                    for(int yr = 50; yr>=0; yr--){
                        if(y[yr]<n) continue;

                        boolean c[][] = new boolean[51][];
                        int cnt = 0, ax = 0, ay = 0;
                        for(int i = 0; i<51; i++) c[i] = p[i].clone();

                        for(int i = 0; i<4*n+1; i++){
                            if( (a[i].x==xl || a[i].x==xr || a[i].y==yl || a[i].y==yr) && (a[i].x>=xl && a[i].x<=xr && a[i].y>=yl && a[i].y<=yr)) continue;
                            ax = a[i].x;
                            ay = a[i].y;
                            break;
                        }
                        System.out.println(ax+" "+ay);
                        return;

                    }
                }
            }
        }
        System.out.println();
    }

    static class Pair{
        int x, y;
        Pair(int a, int b){
            x = a;
            y = b;
        }
    }
}

import javafx.util.Pair;

import java.io.*;
import java.util.*;

public class Task1 {
    public static class Point {
        int x, y;

        Point(int x, int y) {
            this.x = x;
            this.y = y;
        }
    }

    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        int n = Integer.parseInt(reader.readLine());
        String[] s;
        Point[] kek = new Point[4 * n + 1];
        Point[] temp = new Point[4 * n + 1];
        int x1, x2, y1, y2;
        for (int i = 0; i < 4 * n + 1; ++i) {
            s = reader.readLine().split(" ");
            temp[i] = new Point(Integer.parseInt(s[0]), Integer.parseInt(s[1]));
            kek[i] = new Point(Integer.parseInt(s[0]), Integer.parseInt(s[1]));
        }
        Arrays.sort(temp, (o1, o2) -> o1.y > o2.y ? 1 : o1.y == o2.y ? Integer.compare(o1.x, o2.x) : -1);
        Arrays.sort(kek, (o1, o2) -> o1.x > o2.x ? 1 : o1.x == o2.x ? Integer.compare(o1.y, o2.y) : -1);
        x1 = kek[1].x;
        x2 = kek[4 * n - 1].x;
        y1 = temp[1].y;
        y2 = temp[4 * n - 1].y;
        for (int i = 0; i < 4 * n + 1; ++i) {
            if ((kek[i].x != x1 && kek[i].x != x2 && kek[i].y != y1 && kek[i].y != y2) || kek[i].x > x2 || kek[i].x < x1 || kek[i].y > y2 || kek[i].y < y1) {
                out.println(kek[i].x + " " + kek[i].y);
                out.close();
                return;
            }
        }

        reader.close();
        out.close();

    }
}

import java.util.*;

import java.io.*;
import java.text.*;

public class C1_1184 {

	static class Pair implements Comparable<Pair> {
		int x, y;

		public Pair(int d, int g) {
			this.x = d;
			this.y = g;
		}

		public int compareTo(Pair p) {
			if (x == p.x)
				return y - p.y;
			return x - p.x;
		}
		public String toString() {
			return x+" "+y;
		}
	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		int n = sc.nextInt();
		Pair[] arr = new Pair[4*n+1];
		HashSet<Integer> xs = new HashSet<Integer>();
		HashSet<Integer> ys = new HashSet<Integer>();
		int minx = 100;
		int miny = 100;
		int maxx = -1;
		int maxy = -1;
		for (int i = 0; i < 4 * n + 1; i++) {
			int x = sc.nextInt();
			int y = sc.nextInt();
			if (!xs.contains(x))
				xs.add(x);
			else
			{
				minx = Math.min(minx, x);
				maxx = Math.max(maxx, x);
			}
			if (!ys.contains(y))
				ys.add(y);
			else
			{
				miny = Math.min(miny, y);
				maxy = Math.max(maxy, y);
			}
				arr[i] = new Pair(x, y);
		}
		for (int i = 0; i < arr.length; i++) {
			int xx = arr[i].x;
			int yy =arr[i].y;
			if(!(xx>=minx && xx<=maxx && yy>=miny && yy<=maxy))
			{
				pw.println(arr[i]);
				pw.flush();
				pw.close();
				return;
			}
		}
		for (int i = 0; i < arr.length; i++) {
			int xx = arr[i].x;
			int yy =arr[i].y;
			if(!(xx == minx || xx==maxx || yy==miny || yy==maxy))
			{
				pw.println(arr[i]);
				pw.flush();
				pw.close();
				return;
			}
		}

		pw.flush();
		pw.close();
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if (x.charAt(0) == '-') {
				neg = true;
				start++;
			}
			for (int i = start; i < x.length(); i++)
				if (x.charAt(i) == '.') {
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				} else {
					sb.append(x.charAt(i));
					if (dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg ? -1 : 1);
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

	}

}

import java.io.*;
import java.util.*;

public class HeidiTuring {

    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public float nextFloat() {
            return Float.parseFloat(next());
        }
    }

    static InputReader r = new InputReader(System.in);
    static PrintWriter pw = new PrintWriter(System.out);

    public static void main(String[] args) {
        int n = r.nextInt();
        ArrayList<int[]> points = new ArrayList<int[]>(); // Each point is represented as {x, y};
        for(int i = 0; i < 4 * n + 1; i++){
            points.add(new int[]{r.nextInt(), r.nextInt()});
        }
        int[] x = new int[51];
        int[] y = new int[51];
        for(int[] p : points){
            x[p[0]]++;
            y[p[1]]++;
        }
        int xMin = -1, xMax = -1, yMin = -1, yMax = -1;
        for(int i = 0; i <= 50; i++){
            if(x[i] >= 2){
                xMax = i;
            }
            if(y[i] >= 2){
                yMax = i;
            }
        }
        for(int i = 50; i >= 0; i--){
            if(x[i] >= 2){
                xMin = i;
            }
            if(y[i] >= 2){
                yMin = i;
            }
        }
        for(int i = 0; i < 4 * n + 1; i++){
            if((points.get(i)[0] == xMin || points.get(i)[0] == xMax) && (points.get(i)[1] >= yMin && points.get(i)[1] <= yMax)){

            } else if((points.get(i)[1] == yMin || points.get(i)[1] == yMax) && (points.get(i)[0] >= xMin && points.get(i)[0] <= xMax)){

            } else{
                pw.println(points.get(i)[0] + " " + points.get(i)[1]);
            }
        }

        pw.close();
    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.util.HashMap;
import java.io.InputStreamReader;
import java.io.FileNotFoundException;
import java.util.StringTokenizer;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Sri Mouli (sri.vcmk@gmail.com)
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        C1HeidiAndTheTuringTestEasy solver = new C1HeidiAndTheTuringTestEasy();
        solver.solve(1, in, out);
        out.close();
    }

    static class C1HeidiAndTheTuringTestEasy {
        public void solve(int testNumber, InputReader in, OutputWriter out) {

            int n = in.nextInt();
            int xMin = Integer.MAX_VALUE, xMin1 = Integer.MAX_VALUE, yMin = Integer.MAX_VALUE, yMin1 = Integer.MAX_VALUE;
            int xMax = Integer.MIN_VALUE, xMax1 = Integer.MIN_VALUE, yMax = Integer.MIN_VALUE, yMax1 = Integer.MIN_VALUE;
            HashMap<Integer, Integer> xAxis = new HashMap<>();
            HashMap<Integer, Integer> yAxis = new HashMap<>();
            int[][] a = next2DInt(in, (4 * n) + 1, xMin, xMin1, yMin, yMin1, xMax, xMax1, yMax, yMax1, xAxis, yAxis);
            int xMinByCount = Integer.MAX_VALUE, xMaxByCount = Integer.MIN_VALUE;
            int yMinByCount = Integer.MAX_VALUE, yMaxByCount = Integer.MIN_VALUE;
            for (Integer x : xAxis.keySet()) {
                if (xAxis.get(x) >= n) {
                    if (x > xMaxByCount) {
                        xMaxByCount = x;
                    }
                    if (x < xMinByCount) {
                        xMinByCount = x;
                    }
                }
            }
            for (Integer y : yAxis.keySet()) {
                if (yAxis.get(y) >= n) {
                    if (y > yMaxByCount) {
                        yMaxByCount = y;
                    }
                    if (y < yMinByCount) {
                        yMinByCount = y;
                    }
                }
            }

            for (int i = 0; i < (4 * n) + 1; i++) {
                if (a[i][0] < xMinByCount || a[i][0] > xMaxByCount || a[i][1] < yMinByCount || a[i][1] > yMaxByCount) {
                    out.printLine(a[i][0], a[i][1]);
                    return;
                }
                if ((a[i][0] != xMinByCount && a[i][0] != xMaxByCount && a[i][1] > yMinByCount && a[i][1] < yMaxByCount)) {
                    out.printLine(a[i][0], a[i][1]);
                    return;
                }
                if ((a[i][0] > xMinByCount && a[i][0] < xMaxByCount && a[i][1] != yMinByCount && a[i][1] != yMaxByCount)) {
                    out.printLine(a[i][0], a[i][1]);
                    return;
                }
            }

        }

        public int[][] next2DInt(InputReader in, int n, int xMin, int xMin1, int yMin, int yMin1, int xMax, int xMax1, int yMax, int yMax1,
                                 HashMap<Integer, Integer> xAxis, HashMap<Integer, Integer> yAxis) {
            int[][] arr = new int[n][2];
            for (int i = 0; i < n; i++) {
                int x = in.nextInt();
                if (xAxis.containsKey(x)) {
                    xAxis.put(x, xAxis.get(x) + 1);
                } else {
                    xAxis.put(x, 1);
                }
                int y = in.nextInt();
                if (yAxis.containsKey(y)) {
                    yAxis.put(y, yAxis.get(y) + 1);
                } else {
                    yAxis.put(y, 1);
                }
                arr[i][0] = x;
                arr[i][1] = y;
                if (x > xMax) {
                    xMax1 = xMax;
                    xMax = x;
                } else if (x < xMin) {
                    xMin1 = xMin;
                    xMin = x;
                }
                if (y > yMax) {
                    yMax1 = yMax;
                    yMax = y;
                } else if (y < yMin) {
                    yMin1 = yMin;
                    yMin = y;
                }
            }
            return arr;
        }

    }

    static class InputReader {
        private BufferedReader br;
        private StringTokenizer st;

        public InputReader(InputStream inputStream) {
            br = new BufferedReader(new InputStreamReader(inputStream));
        }

        InputReader(String file) {
            try {
                br = new BufferedReader(new FileReader(file));
            } catch (FileNotFoundException ignored) {

            }
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void printLine(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author KharYusuf
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        C1HeidiAndTheTuringTestEasy solver = new C1HeidiAndTheTuringTestEasy();
        solver.solve(1, in, out);
        out.close();
    }

    static class C1HeidiAndTheTuringTestEasy {
        public void solve(int testNumber, FastReader s, PrintWriter w) {
            int n = s.nextInt(), fx[] = new int[51], fy[] = new int[51], minx = 50, miny = 50, maxx = 0, maxy = 0;
            pair<Integer, Integer>[] p = new pair[(n << 2) + 1];
            for (int i = 0; i < (n << 2) + 1; i++) {
                p[i] = new pair(s.nextInt(), s.nextInt());
                fx[p[i].x]++;
                fy[p[i].y]++;
            }
            for (int i = 0; i <= 50; i++) {
                if (fx[i] >= n) {
                    minx = Math.min(minx, i);
                    maxx = Math.max(maxx, i);
                }
                if (fy[i] >= n) {
                    miny = Math.min(miny, i);
                    maxy = Math.max(maxy, i);
                }
            }
            for (pair<Integer, Integer> pp : p) {
                if (pp.x == minx || pp.x == maxx) {
                    if (pp.y < miny || pp.y > maxy) {
                        w.println(pp.x + " " + pp.y);
                        return;
                    }
                } else if (pp.y == miny || pp.y == maxy) {
                    if (pp.x < minx || pp.x > maxx) {
                        w.println(pp.x + " " + pp.y);
                        return;
                    }
                } else {
                    w.println(pp.x + " " + pp.y);
                    return;
                }
            }
        }

    }

    static class pair<U extends Comparable<U>, V extends Comparable<V>> implements Comparable<pair<U, V>> {
        public U x;
        public V y;

        public pair(U x, V y) {
            this.x = x;
            this.y = y;
        }

        public int compareTo(pair<U, V> other) {
            if (this.x.compareTo(other.x) != 0) return this.x.compareTo(other.x);
            return this.y.compareTo(other.y);
        }

        public String toString() {
            return x.toString() + " " + y.toString();
        }

        public boolean equals(Object obj) {
            if (this.getClass() != obj.getClass()) return false;
            pair<U, V> other = (pair<U, V>) obj;
            return this.x.equals(other.x) && this.y.equals(other.y);
        }

        public int hashCode() {
            return toString().hashCode();
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private FastReader.SpaceCharFilter filter;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {

            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars) {

                curChar = 0;

                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }

            return buf[curChar++];
        }

        public int nextInt() {

            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();

                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public boolean isSpaceChar(int c) {

            if (filter != null)
                return filter.isSpaceChar(c);

            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}

import java.io.*;
import java.util.*;

public class C1 {
    public void solve() throws IOException {
        int n = nextInt();
        int[] x = new int[51];
        int[] y = new int[51];
        int[][] p = new int[4 * n + 1][2];
        for (int i = 0; i < 4 * n + 1; i++) {
            int cx = nextInt();
            int cy = nextInt();
            x[cx]++;
            y[cy]++;
            p[i][0] = cx;
            p[i][1] = cy;
        }
        int[] grx = new int[2];
        int[] gry = new int[2];
        grx[0] = 50;
        gry[0] = 50;
        for (int i = 0; i < 51; i++) {
            if (x[i] >= n) {
                grx[1] = i;
            }
            if (y[i] >= n) {
                gry[1] = i;
            }
        }
        for (int i = 50; i >= 0; i--) {
            if (x[i] >= n) {
                grx[0] = i;
            }
            if (y[i] >= n) {
                gry[0] = i;
            }
        }
        for (int i = 0; i < 4 * n + 1; i++) {
            if (p[i][0] != grx[0] && p[i][0] != grx[1] && p[i][1] != gry[0] && gry[1] != p[i][1]) {
                out.print(p[i][0] + " " + p[i][1]);
                return;
            } else if (p[i][0] == grx[0] || p[i][0] == grx[1]) {
                if (p[i][1] < gry[0] || p[i][1] > gry[1]) {
                    out.print(p[i][0] + " " + p[i][1]);
                    return;
                }
            } else if (p[i][1] == gry[0] || gry[1] == p[i][1]) {
                if (p[i][0] < grx[0] || p[i][0] > grx[1]) {
                    out.print(p[i][0] + " " + p[i][1]);
                    return;
                }
            }
        }
    }

    public void run() {
        try {
            br = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);

            solve();

            out.close();
        } catch (IOException e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    BufferedReader br;
    StringTokenizer in;
    PrintWriter out;

    public String nextToken() throws IOException {
        while (in == null || !in.hasMoreTokens()) {
            in = new StringTokenizer(br.readLine());
        }
        return in.nextToken();
    }

    public int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    public long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    public int[] nextArr(int n) throws IOException {
        int[] res = new int[n];
        for (int i = 0; i < n; i++) {
            res[i] = nextInt();
        }
        return res;
    }

    public static void main(String[] args) throws IOException {
        Locale.setDefault(Locale.US);
        new C1().run();
    }
}

import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Codeforces {
    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
    public static void main(String[] args) throws Exception{
        FastReader input = new FastReader();
        int n = input.nextInt();
        Point[] points = new Point[4 * n + 1];
        for (int i = 0; i < 4 * n + 1; i++){
            Point p = new Point(input.nextInt(), input.nextInt());
            points[i] = p;
        }

        for (int i = 0; i < 51; i++){
            for (int j = i + 1; j < 51; j++){
                for (int k = 0; k < 51; k++){
                    for (int l = k + 1; l < 51; l++){
                        int on = 0;
                        for (int x = 0; x < 4 * n + 1; x++){
                            on += isOn(i, j, k, l, points[x]) ? 1 : 0;
                        }
                        if (on == 4 * n){
                            for (int x = 0; x < 4 * n + 1; x++){
                            if(!isOn(i, j, k, l, points[x])){
                                System.out.println(points[x].x + " " + points[x].y);
                                return;
                            }

                        }
                        }
                    }
                }
            }
        }
    }
    public static boolean isOn(int i, int j, int k, int l, Point p){
        return (i <= p.x && j >= p.x && (p.y == k || p.y == l)) || (k <= p.y && l >= p.y && (p.x == i || p.x == j));
    }
}

import java.util.*;

public class Solution {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] sqr = new int[51][51];
        int xMin = 52; int xMax = 0;
        int yMin = 52; int yMax = 0;
        for(int i=0;i<4*n+1;i++){
            int x = sc.nextInt();
            int y = sc.nextInt();
            sqr[x][y] = 1;
        }

        for(int i=0;i<51;i++){
            ArrayList<Integer> xValues = new ArrayList<>();
            for(int j=0;j<51;j++){
                if(sqr[i][j]==1){
                    xValues.add(i);
                }
            }
            if(xValues.size()>=n){
                xMin = Math.min(xMin,xValues.get(0));
                xMax = Math.max(xMax,xValues.get(xValues.size()-1));
            }
        }

        for(int i=0;i<51;i++){
            ArrayList<Integer> yValues = new ArrayList<>();
            for(int j=0;j<51;j++){
                if(sqr[j][i]==1){
                    yValues.add(i);
                }
            }
            if(yValues.size()>=n){
                yMin = Math.min(yMin,yValues.get(0));
                yMax = Math.max(yMax,yValues.get(yValues.size()-1));
            }
        }

        for(int i=xMin+1;i<xMax;i++){
            for(int j=yMin+1;j<yMax;j++){
                if(sqr[i][j]==1){
                    System.out.println(i+ " "+j);
                    return;
                }
            }
        }
        for(int i=xMin;i<=xMax;i++){
            for(int j=yMin;j<=yMax;j++){
                sqr[i][j]=0;
            }
        }
        for(int i=0;i<51;i++){
            for(int j=0;j<51;j++){
                if(sqr[i][j]==1){
                    System.out.println(i+ " "+j);
                    return;
                }
            }
        }
    }
}

import java.io.*;
import java.util.*;
public class MainClass
{
	public static void main(String args[])throws IOException
	{
	    try
	    {
    		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    		int n=Integer.parseInt(br.readLine());
    		int x[]=new int[(4*n+1)];
    		int y[]=new int[(4*n+1)];
    		int a[]=new int[51];
    		int b[]=new int[51];
    		for(int i=0;i<=4*n;i++)
    		{
    		    String t_input[];
                t_input=br.readLine().split(" ");
                x[i]=Integer.parseInt(t_input[0]);
                y[i]=Integer.parseInt(t_input[1]);
                a[x[i]]++;
                b[y[i]]++;
    		}
    		int x1=-1,y1=-1,x2=-1,y2=-1;
    		A:for(int i=50;i>=1;i--)
    		{
    		    for(int j=0;j<=50-i;j++)
    		    {
    		        int p1=j;
    		        int p2=j+i;
    		        int x11=a[p1],x22=a[p2];
    		        for(int k=0;k<=50-i;k++)
    		        {
    		            int p3=k;
    		            int p4=k+i;
    		            int y11=b[p3],y22=b[p4];
        		        if(x11>=n&&x22>=n&&y11>=n&&y22>=n)
        		        {
        		            x1=p1;x2=p2;y1=p3;y2=p4;
        		            break A;
        		        }
    		        }
    		    }
    		}
    		for(int i=0;i<=4*n;i++)
    		{
    		    if((x[i]==x1||x[i]==x2)&&(y[i]>=y1&&y[i]<=y2))
    		    {}
    		    else if((y[i]==y1||y[i]==y2)&&(x[i]>=x1&&x[i]<=x2))
    		    {}
    		    else
    		    System.out.println(x[i]+" "+y[i]);
    		}
	    }
		catch(NumberFormatException x){}
	}
}
/*
__________ARRAY INPUT:
String a_input[];
        a_input=br.readLine().split(" ");
        int a[]=new int[n];
        for(int i=0;i<n;i++)
        {
            a[i]=Integer.parseInt(a_input[i]);
        }

__________INPUT FOR TWO SPACE SEPARATED INTEGERS:
String t_input[];
t_input=br.readLine().split(" ");
int n=Integer.parseInt(t_input[0]);
int k=Integer.parseInt(t_input[1]);

__________STRING TO INTEGER ARRAY: ex-12345 to 1,2,3,4,5
String st=br.readLine();
char chars[]=st.toCharArray();
int a[]=new int[st.length()];
for(int i=0;i<st.length();i++)
a[i]=chars[i]-48;

__________ARRAY WITH SPACE SEPARATED INTEGERS:
int a[]=new int[n];
	        String t_input[];
            t_input=br.readLine().split(" ");
            for(int i=0;i<n;i++)
            {
                a[i]=Integer.parseInt(t_input[i]);
            }

__________TO SORT IN DESCENDING: Arrays.sort(b,Collections.reverseOrder());
*/

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskC1 solver = new TaskC1();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC1 {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.nextInt();
            n = n * 4 + 1;
            int m = n / 4;
            int[] x = new int[n];
            int[] y = new int[n];

            for (int i = 0; i < n; i++) {
                x[i] = in.nextInt();
                y[i] = in.nextInt();
            }

            for (int i = 0; i < n; i++) {
                int mnx = Integer.MAX_VALUE, maxx = -1;
                int mny = Integer.MAX_VALUE, maxy = -1;
                for (int j = 0; j < n; j++)
                    if (i != j) {
                        mnx = Integer.min(mnx, x[j]);
                        mny = Integer.min(mny, y[j]);
                        maxx = Integer.max(maxx, x[j]);
                        maxy = Integer.max(maxy, y[j]);
                    }
                int[] cnt = new int[4];
                boolean OK = true;
                boolean there_i = false;
                for (int j = 0; j < n; j++) {
                    boolean ok = false;

                    if (x[j] == mnx && y[j] >= mny && y[j] <= maxy) {
                        cnt[0]++;
                        ok = true;
                    }

                    if (x[j] == maxx && y[j] >= mny && y[j] <= maxy) {
                        cnt[1]++;
                        ok = true;
                    }

                    if (y[j] == mny && x[j] >= mnx && x[j] <= maxx) {
                        cnt[2]++;
                        ok = true;
                    }

                    if (y[j] == maxy && x[j] >= mnx && x[j] <= maxx) {
                        cnt[3]++;
                        ok = true;
                    }
                    if (i == j) there_i = ok;
                    else OK &= ok;
                }
//            if(i == 1)
                if (OK && !there_i && cnt[0] >= m && cnt[1] >= m && cnt[2] >= m && cnt[3] >= m) {
//                System.out.println(Arrays.toString(cnt));
                    out.println(x[i] + " " + y[i]);
                    return;
                }
            }
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void println(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
            writer.print('\n');
        }

        public void close() {
            writer.close();
        }

    }
}

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n;
        n = sc.nextInt();

        Set<Point> xpts = new HashSet<>();
        Set<Point> ypts = new HashSet<>();
        Set<Point> pts = new HashSet<>();
        Map<Integer, Set<Point>> xgs = new HashMap<>();
        Map<Integer, Set<Point>> ygs = new HashMap<>();
        for (int i = 0; i < 4*n + 1; i++) {
            int x, y;
            x = sc.nextInt();
            y = sc.nextInt();
            Point pt = Point.of(x, y);
            xpts.add(pt);
            ypts.add(pt);
            pts.add(pt);

            if (xgs.containsKey(x)) {
                Set<Point> ps = xgs.get(x);
                ps.add(pt);
            }
            else {
                Set<Point> ps = new HashSet<>();
                ps.add(pt);
                xgs.put(x, ps);
            }

            if (ygs.containsKey(y)) {
                Set<Point> ps = ygs.get(y);
                ps.add(pt);
            }
            else {
                Set<Point> ps = new HashSet<>();
                ps.add(pt);
                ygs.put(y, ps);
            }
        }

        //System.out.println("xgs: " + xgs);
        //System.out.println("ygs: " + ygs);
        int xl = Integer.MAX_VALUE, xh = 0, yl = Integer.MAX_VALUE, yh = 0;
        for (Map.Entry<Integer, Set<Point>> e : xgs.entrySet()) {
            if (e.getValue().size() < n) {
                continue;
            }

            for (Point p : e.getValue()) {
                xpts.remove(p);
            }

            if (e.getKey() < xl) {
                xl = e.getKey();
            }

            if (e.getKey() > xh) {
                xh = e.getKey();
            }
        }
        for (Map.Entry<Integer, Set<Point>> e : ygs.entrySet()) {
            if (e.getValue().size() < n) {
                continue;
            }

            for (Point p : e.getValue()) {
                ypts.remove(p);
            }

            if (e.getKey() < yl) {
                yl = e.getKey();
            }

            if (e.getKey() > yh) {
                yh = e.getKey();
            }
        }
        //System.out.println("xgs: " + xgs);
        //System.out.println("ygs: " + ygs);

        //System.out.printf("xl: %d, xh: %d, yl: %d, yh: %d\n", xl, xh, yl, yh);
	boolean found = false;
	for (Point p : pts) {
		if ((p.x == xl || p.x == xh) && (p.y >= yl && p.y <= yh)) {
			continue;
		}
		if ((p.y == yl || p.y == yh) && (p.x >= xl && p.x <= xh)) {
			continue;
		}
		found = true;
		System.out.printf("%d %d", p.x, p.y);
		break;
	}
	if (!found) {
		System.out.print("1 1");
		//System.out.println("X: " + xpts);
		//System.out.println("Y: " + ypts);
	}
        //if (xpts.size() == 1) {
        //    Point p = new ArrayList<>(xpts).get(0);
        //    System.out.printf("%d %d", p.x, p.y);
        //} else {
        //    if (ypts.size() == 1) {
        //    Point p = new ArrayList<>(ypts).get(0);
        //    System.out.printf("%d %d", p.x, p.y);
        //    } else {
        //        boolean found = false;
        //        for (Point p : pts) {
        //            if (p.x != xl && p.x != xh && p.y != yl && p.y != yh) {
        //                found = true;
        //                System.out.printf("%d %d", p.x, p.y);
        //                break;
        //            }
        //        }
        //        if (!found) {
        //            System.out.println("1 1");
        //            //System.out.println("X: " + xpts);
        //            //System.out.println("Y: " + ypts);
        //        }
        //    }
        //}
    }

    private static class Point {
        public int x, y;

        Point(int x, int y) {
            this.x = x;
            this.y = y;
        }

        static Point of(int x, int y) {
            return new Point(x, y);
        }

        public String toString() {
            return "Point(x:" + x + ", y:" + y + ")";
        }
    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Washoum
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        inputClass in = new inputClass(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        C1HeidiAndTheTuringTestEasy solver = new C1HeidiAndTheTuringTestEasy();
        solver.solve(1, in, out);
        out.close();
    }

    static class C1HeidiAndTheTuringTestEasy {
        public void solve(int testNumber, inputClass sc, PrintWriter out) {
            int n = sc.nextInt();
            int[] x = new int[4 * n + 1];
            int[] y = new int[4 * n + 1];
            for (int i = 0; i < 4 * n + 1; i++) {
                x[i] = sc.nextInt();
                y[i] = sc.nextInt();
            }
            int markedx = -1;
            int markedy = -1;
            for (int a = 1; a <= 50; a++) {
                for (int debx = 0; debx + a <= 50; debx++) {
                    for (int deby = 0; deby + a <= 50; deby++) {
                        int nb = 0;
                        for (int i = 0; i < 4 * n + 1; i++) {
                            if ((x[i] == debx || x[i] == debx + a) && (y[i] >= deby && y[i] <= deby + a)) {
                                nb++;
                            } else if ((y[i] == deby || y[i] == deby + a) && (x[i] >= debx && x[i] <= debx + a)) {
                                nb++;
                            } else {
                                markedx = x[i];
                                markedy = y[i];
                            }
                        }
                        if (nb == 4 * n) {
                            out.println(markedx + " " + markedy);
                            return;
                        }
                    }
                }
            }
        }

    }

    static class inputClass {
        BufferedReader br;
        StringTokenizer st;

        public inputClass(InputStream in) {

            br = new BufferedReader(new InputStreamReader(in));
        }

        public String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;

/**
 * #
 *
 * @author pttrung
 */
public class C1_Helvetic_2019 {

    public static long MOD = 998244353;
    static int[][] dp;

    public static void main(String[] args) throws FileNotFoundException {
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File(
        // "output.txt")));
        PrintWriter out = new PrintWriter(System.out);
        Scanner in = new Scanner();
        int n = in.nextInt();

        Point[] data = new Point[4 * n + 1];
        for (int i = 0; i < data.length; i++) {
            data[i] = new Point(in.nextInt(), in.nextInt());
        }
        int index = -1;
        for (int i = 0; i < data.length; i++) {
            int minX = Integer.MAX_VALUE, maxX = 0;
            int minY = Integer.MAX_VALUE, maxY = 0;
            for (int j = 0; j < data.length; j++) {
                if (i != j) {
                    minX = Integer.min(minX, data[j].x);
                    maxX = Integer.max(maxX, data[j].x);
                    minY = Integer.min(minY, data[j].y);
                    maxY = Integer.max(maxY, data[j].y);
                }
            }
            boolean ok = !check(data[i], minX, maxX, minY, maxY) && (maxX - minX == maxY - minY);
            for (int j = 0; j < data.length && ok; j++) {
                if (i == j) {
                    continue;
                }
                ok = check(data[j], minX, maxX, minY, maxY);
            }
            if (ok) {
                //System.out.println(minX + " " + maxX + " " + minY + " " + maxY);
                index = i;
                break;
            }
        }
        out.println(data[index].x + " " + data[index].y);
        out.close();
    }

    static boolean check(Point data, int minX, int maxX, int minY, int maxY) {
        boolean ok = true;
        if (data.x == minX || data.x == maxX) {
            ok &= data.y >= minY && data.y <= maxY;
        } else if (data.y == minY || data.y == maxY) {
            ok &= data.x >= minX && data.x <= maxX;
        } else {
            ok = false;
        }
        return ok;
    }

    static int log(int n) {
        int result = 0;
        long st = 1;
        for (int i = 0; st <= n; i++) {

            result = i;

            st *= 2L;
        }
        return result;
    }

    static long abs(long v) {
        return v < 0 ? -v : v;
    }

    static int[] cal(double v) {
        int[] re = new int[2];
        if (v >= 0) {
            re[0] = (int) Math.floor(v);
            re[1] = (int) Math.ceil(v);
        } else {
            re[0] = (int) Math.ceil(v);
            re[1] = (int) Math.floor(v);
        }
        return re;
    }

    public static int[] KMP(String val) {
        int i = 0;
        int j = -1;
        int[] result = new int[val.length() + 1];
        result[0] = -1;
        while (i < val.length()) {
            while (j >= 0 && val.charAt(j) != val.charAt(i)) {
                j = result[j];
            }
            j++;
            i++;
            result[i] = j;
        }
        return result;

    }

    public static boolean nextPer(int[] data) {
        int i = data.length - 1;
        while (i > 0 && data[i] < data[i - 1]) {
            i--;
        }
        if (i == 0) {
            return false;
        }
        int j = data.length - 1;
        while (data[j] < data[i - 1]) {
            j--;
        }
        int temp = data[i - 1];
        data[i - 1] = data[j];
        data[j] = temp;
        Arrays.sort(data, i, data.length);
        return true;
    }

    public static int digit(long n) {
        int result = 0;
        while (n > 0) {
            n /= 10;
            result++;
        }
        return result;
    }

    public static double dist(long a, long b, long x, long y) {
        double val = (b - a) * (b - a) + (x - y) * (x - y);
        val = Math.sqrt(val);
        double other = x * x + a * a;
        other = Math.sqrt(other);
        return val + other;

    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int start, int end) {
            this.x = start;
            this.y = end;
        }

        @Override
        public int hashCode() {
            int hash = 5;
            hash = 47 * hash + this.x;
            hash = 47 * hash + this.y;
            return hash;
        }

        @Override
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            final Point other = (Point) obj;
            if (this.x != other.x) {
                return false;
            }
            if (this.y != other.y) {
                return false;
            }
            return true;
        }

        @Override
        public int compareTo(Point o) {
            return Integer.compare(x, o.x);
        }
    }

    public static class FT {

        long[] data;

        FT(int n) {
            data = new long[n];
        }

        public void update(int index, long value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public long get(int index) {
            long result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

    public static long gcd(long a, long b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static long pow(long a, long b) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2);
        if (b % 2 == 0) {
            return val * val;
        } else {
            return val * (val * a);

        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Jeel Vaishnav
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        C1HeidiAndTheTuringTestEasy solver = new C1HeidiAndTheTuringTestEasy();
        solver.solve(1, in, out);
        out.close();
    }

    static class C1HeidiAndTheTuringTestEasy {
        public void solve(int testNumber, InputReader sc, PrintWriter out) {
            int n = 4 * sc.nextInt() + 1;

            Point p[] = new Point[n];
            for (int i = 0; i < n; ++i) {
                p[i] = new Point(sc.nextInt(), sc.nextInt());
            }

            for (int j = 0; j < n; ++j) {
                int flag = 0;
                int minX = Integer.MAX_VALUE, maxX = Integer.MIN_VALUE;
                int minY = Integer.MAX_VALUE, maxY = Integer.MIN_VALUE;
                for (int i = 0; i < n; ++i) {
                    if (i == j)
                        continue;

                    minX = Math.min(minX, p[i].x);
                    maxX = Math.max(maxX, p[i].x);
                    maxY = Math.max(maxY, p[i].y);
                    minY = Math.min(minY, p[i].y);
                }

                if (maxX - minX != maxY - minY)
                    flag = 1;

                for (int i = 0; i < n; ++i) {
                    if (i == j)
                        continue;

                    if (p[i].x == maxX || p[i].x == minX) {
                        if (p[i].y > maxY || p[i].y < minY)
                            flag = 1;
                    } else if (p[i].y == maxY || p[i].y == minY) {
                        if (p[i].x > maxX || p[i].x < minX)
                            flag = 1;
                    } else
                        flag = 1;
                }

                if (flag == 0) {
                    out.print(p[j].x + " " + p[j].y);
                    return;
                }
            }
        }

        class Point {
            int x;
            int y;

            Point(int a, int b) {
                x = a;
                y = b;
            }

        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}

import java.util.*;
public class mainC1{
    static Scanner enter=new Scanner(System.in);
    static int d3=51;
    static ArrayList<Integer> x=new ArrayList<>();
    static ArrayList<Integer> y=new ArrayList<>();
    public static void main(String[] args) {
        int n=enter.nextInt();
        for (int i = 0; i <4*n+1 ; i++) {
            int a=enter.nextInt();
            int b=enter.nextInt();
            x.add(a);
            y.add(b);
        }
        for (int i = 0; i <4*n+1 ; i++) {
            if(cubewithout(i,n)){
                System.out.println(x.get(i)+" "+y.get(i));
            }
        }
    }

    private static boolean cubewithout(int i, int n) {
        int[][] arr=new int[d3][d3];
        int r=-1, l=d3, d=d3;
        int u=-1;
        for (int j = 0; j <x.size() ; j++) {
            if(j==i) continue;
            arr[x.get(j)][y.get(j)]=1;
            r=Math.max(r,x.get(j));
            l=Math.min(l, x.get(j));
            u=Math.max(u, y.get(j));
            d=Math.min(d, y.get(j));
        }
        int ans=0;
        int summ=0;
        for (int j = d; j <=u ; j++) {
            ans+=arr[l][j];
        }
        summ=ans;
        if(summ<n) return false;
        for (int j = l+1; j <r+1 ; j++) {
            ans+=arr[j][d];
        }
        summ=ans-summ+arr[l][d];
        if(summ<n) return false;
        summ=ans;
        for (int j = d+1; j <u+1 ; j++) {
            ans+=arr[r][j];
        }
        summ=ans-summ+arr[r][d];
        if(summ<n) return false;
        summ=ans;
        for (int j = l+1; j <r ; j++) {
            ans+=arr[j][u];
        }
        summ=ans-summ+arr[l][u]+arr[r][u];
        if(summ<n) return false;
        if(ans==4*n) return true;
        return false;
    }

}

import java.util.*;
import java.lang.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.*;

public class Main {

    public static void main(String[] args) throws Exception{
        FastReader sc=new FastReader();
        OutputStream outputStream = System.out;
        PrintWriter out = new PrintWriter(outputStream);
        Main mm=new Main();
        int n=sc.nextInt();
        int[] x=new int[4*n+1];
        int[] y=new int[4*n+1];
        for(int i=0;i<4*n+1;i++) {
            x[i]=sc.nextInt();
            y[i]=sc.nextInt();
        }
        int flag=0;
        int ans_x=-1;
        int ans_y=-1;
        for(int i=0;i<=50;i++) {
            for(int j=0;j<=50;j++) {
                for(int l=0;l<=50;l++) {
                    int count=0;
                    int tx=-1;
                    int ty=-1;
                    for(int p=0;p<4*n+1;p++) {
                        if(((x[p]==i || x[p]==i+l) && (y[p]>=j && y[p]<=j+l)) || ((y[p]==j || y[p]==j+l) && (x[p]>=i && x[p]<=i+l))) {

                        }
                        else {
                            count++;
                            tx=x[p];
                            ty=y[p];
                        }

                    }
                    if(count==1) {
                        ans_x=tx;
                        ans_y=ty;
                        flag=1;
                    }
                    if(flag==1) {
                        break;
                    }
                }
                if(flag==1) {
                    break;
                }
            }
            if(flag==1) {
                break;
            }
        }
        System.out.println(ans_x+" "+ans_y);
    }
}
class a implements Comparator<node>{
    public int compare(node n1,node n2) {
        return n1.power-n2.power;
    }
}
class node{
    int power;
    int gold;
    node(int power,int gold){
        this.gold=gold;
        this.power=power;
    }
}
class FastReader
{
    BufferedReader br;
    StringTokenizer st;

    public FastReader()
    {
        br = new BufferedReader(new
                 InputStreamReader(System.in));
    }

    String next()
    {
        while (st == null || !st.hasMoreElements())
        {
            try
            {
                st = new StringTokenizer(br.readLine());
            }
            catch (IOException  e)
            {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt()
    {
        return Integer.parseInt(next());
    }

    long nextLong()
    {
        return Long.parseLong(next());
    }

    double nextDouble()
    {
        return Double.parseDouble(next());
    }

    String nextLine()
    {
        String str = "";
        try
        {
            str = br.readLine();
        }
        catch (IOException e)
        {
            e.printStackTrace();
        }
        return str;
    }
}

import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;

public class q5 {

	static boolean checkValid(NoD[] arr, int n) {
		boolean tr=false;
		int lowx=51,highx=-1,lowy=51,highy=-1;
		for(int i=0;i<4*n;i++) {
			lowx=Math.min(lowx, arr[i].x);
			lowy=Math.min(lowy, arr[i].y);
			highx=Math.max(highx, arr[i].x);
			highy=Math.max(highy, arr[i].y);
		}
		int included[]=new int[4*n];
		int count=0;
		int[][] v=new int[4][2];
		int[] indi=new int[4];
		for(int i=0;i<4;i++) {
			v[i][0]=51;
			v[i][1]=-1;
		}
		for(int i=0;i<4*n;i++) {
			if(arr[i].x==lowx && arr[i].y>=lowy && arr[i].y<=highy) {
				indi[0]++;
				if(included[i]==0) {
					included[i]=1;count++;
				}

			}
			if(arr[i].x==highx && arr[i].y>=lowy && arr[i].y<=highy) {
				indi[1]++;
				if(included[i]==0) {
					included[i]=1;count++;
				}

			}
			if(arr[i].y==lowy && arr[i].x>=lowx && arr[i].x<=highx) {
				indi[2]++;
				if(included[i]==0) {
					included[i]=1;count++;
				}

			}
			if(arr[i].y==highy && arr[i].x>=lowx && arr[i].x<=highx) {
				indi[3]++;
				if(included[i]==0) {
					included[i]=1;count++;
				}

			}
		}
		if(count==4*n && indi[0]>=n && indi[1]>=n && indi[2]>=n && indi[3]>=n) {
			tr=true;
		}

		return tr;
	}

	public static void main(String[] args) throws IOException {

	Reader.init(System.in);
	PrintWriter out=new PrintWriter(System.out);
	int n=Reader.nextInt();
	NoD[] arr=new NoD[4*n+1];
	for(int i=0;i<4*n+1;i++) {
		arr[i]=new NoD(Reader.nextInt(),Reader.nextInt());
	}
	for(int i=0;i<4*n+1;i++) {
		NoD[] a2=new NoD[4*n];
		int index=0;
		for(int j=0;j<4*n+1;j++) {
			if(j!=i) {
				a2[index++]=arr[j];
			}
		}
		if(i==4) {
			i=4;
		}
		if(checkValid(a2,n)) {
			out.println(arr[i].x+" "+arr[i].y);break;
		}
	}

	out.flush();

	}
}

class NoD{
	int x,y;
	NoD(int a,int b){
		x=a;y=b;
	}
}

class Reader {
    static BufferedReader reader;
    static StringTokenizer tokenizer;
    /** call this method to initialize reader for InputStream */
    static void init() throws IOException {
    	 reader = new BufferedReader(
                 new FileReader("pattern.in") );
    tokenizer = new StringTokenizer("");
    }
    static void init(InputStream input) {
        reader = new BufferedReader(
                     new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }
    /** get next word */
    static String nextLine() throws IOException{
    	return reader.readLine();
    }
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                   reader.readLine() );
        }
        return tokenizer.nextToken();
    }
    static int nextInt() throws IOException {
        return Integer.parseInt( next() );
    }
    static long nextLong() throws IOException {
        return Long.parseLong( next() );
    }
    static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    }
}

import javafx.util.Pair;

import java.util.*;

/**
 * Created by akashchaudhary on 7/5/19.
 */
public class Solution {

    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        List<Pair<Integer, Integer>> points = new ArrayList<>();
        int r[] = new int[51];
        int c[] = new int[51];

        for(int i=0;i<4*n+1;i++){
            int x = sc.nextInt();
            int y = sc.nextInt();
            points.add(new Pair<>(x, y));
            r[x]++;
            c[y]++;
        }

        int r_min = 51;
        int r_max = -1;
        int c_min = 51;
        int c_max = -1;

        for(int i=0;i<=50;i++){
            if(r[i]>=2){
                r_max = Math.max(r_max, i);
                r_min = Math.min(r_min, i);
            }
            if(c[i]>=2){
                c_max = Math.max(c_max, i);
                c_min = Math.min(c_min, i);
            }
        }

        for(int i=0;i<points.size();i++){
            int x = points.get(i).getKey();
            int y = points.get(i).getValue();
            if(x!=r_min && x!=r_max && y!=c_min && y!=c_max){
                System.out.println(""+x+" "+y);
            }else if(x<r_min || x>r_max || y<c_min || y>c_max){
                System.out.println(""+x+" "+y);
            }

        }

    }

}

import java.util.Scanner;

/**
 *
 * @author sina
 */
public class ACMC1 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
       Scanner in=new Scanner(System.in);
       int n=in.nextInt();
       int[] x=new int[4*n+1];
       int[] y=new int[4*n+1];
       int minX=0;
       int minY=0;
       int maxX=0;
       int maxY=0;
       for (int i = 0; i < 4*n+1; i++) {
            x[i]=in.nextInt();
            y[i]=in.nextInt();
       }
        for (int j = 0; j < 4*n+1; j++) {
            for (int i = 0; i < 4*n; i++) {
                if(x[i]>x[i+1])
                {
                   int temp=x[i];
                   x[i]=x[i+1];
                   x[i+1]=temp;
                   temp=y[i];
                   y[i]=y[i+1];
                   y[i+1]=temp;
                }
            }
        }
       if(x[4*n]==x[4*n-1])
       {
           maxX=x[4*n];
       }
       else
       {
           System.out.println(x[4*n]+" "+y[4*n]);
           return;
       }
       if(x[0]==x[1])
       {
           minX=x[0];
       }
       else
       {
           System.out.println(x[0]+" "+y[0]);
           return;
       }
       for (int j = 0; j < 4*n+1; j++) {
            for (int i = 0; i < 4*n; i++) {
                if(y[i]>y[i+1])
                {
                   int temp=x[i];
                   x[i]=x[i+1];
                   x[i+1]=temp;
                   temp=y[i];
                   y[i]=y[i+1];
                   y[i+1]=temp;
                }
            }
        }
       if(y[4*n]==y[4*n-1])
       {
           maxY=y[4*n];
       }
       else
       {
           System.out.println(x[4*n]+" "+y[4*n]);
           return;
       }
       if(y[0]==y[1])
       {
           minY=y[0];
       }
       else
       {
           System.out.println(x[0]+" "+y[0]);
           return;
       }

       for (int i = 0; i < 4*n+1; i++) {
            if(x[i]!=minX&&y[i]!=minY&&x[i]!=maxX&&y[i]!=maxY)
            {
                System.out.println(x[i]+" "+y[i]);
                break;
            }
            else if(x[i]>maxX||y[i]>maxY)
            {
                System.out.println(x[i]+" "+y[i]);
                break;
            }
        }
    }

}

import java.util.Scanner;

/**
 *
 * @author sina
 */
public class ACMC1 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
       Scanner in=new Scanner(System.in);
       int n=in.nextInt();
       int[] x=new int[4*n+1];
       int[] y=new int[4*n+1];
       int maxX=0;
       int maxY=0;
       for (int i = 0; i < 4*n+1; i++) {
            x[i]=in.nextInt();
            y[i]=in.nextInt();
            if(x[i]!=y[i])
            {
                if(x[i]>maxX)
                {
                    maxX=x[i];
                }
                if(y[i]>maxY)
                {
                    maxY=y[i];
                }
            }
       }
       int l=Math.min(maxX, maxY);
       for (int i = 0; i < 4*n+1; i++) {
            if(x[i]!=l&&y[i]!=l&&x[i]!=0&&y[i]!=0)
            {
                System.out.println(x[i]+" "+y[i]);
                break;
            }
            else if(x[i]>l||y[i]>l)
            {
                System.out.println(x[i]+" "+y[i]);
                break;
            }
        }
    }

}

import java.util.Scanner;

/**
 *
 * @author sina
 */
public class ACMC1 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
       Scanner in=new Scanner(System.in);
       int n=in.nextInt();
       int[] x=new int[4*n+1];
       int[] y=new int[4*n+1];
       int[] max=new int[4*n+1];
       int cou=0;
       for (int i = 0; i < 4*n+1; i++) {
            x[i]=in.nextInt();
            y[i]=in.nextInt();
            if(x[i]!=0&&y[i]!=0)
            {
                max[cou]=Math.max(x[i], y[i]);
                cou++;
            }
       }
       int l;
       if(max[0]==max[1])
       {
           l=max[0];
       }
       else
       {
           l=max[2];
       }
       for (int i = 0; i < 4*n+1; i++) {
            if(x[i]!=l&&y[i]!=l&&x[i]!=0&&y[i]!=0)
            {
                System.out.println(x[i]+" "+y[i]);
                break;
            }
            else if(x[i]>l||y[i]>l)
            {
                System.out.println(x[i]+" "+y[i]);
                break;
            }
        }
    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Andy Phan
 */
public class c1 {
    public static void main(String[] args) {
        FS in = new FS(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = in.nextInt();
        Point[] p = new Point[4*n+1];
        for(int i = 0; i < 4*n+1; i++) {
            p[i] = new Point(in.nextInt(), in.nextInt());
        }

        outer: for(int i = 0; i < 4*n+1; i++) {
            int minX = 100;
            int minY = 100;
            int maxX = 0;
            int maxY = 0;
            for(int j = 0; j < 4*n+1; j++) {
                if(j == i) continue;
                minX = Math.min(p[j].x, minX);
                minY = Math.min(p[j].y, minY);
                maxX = Math.max(p[j].x, maxX);
                maxY = Math.max(p[j].y, maxY);
            }

            for(int j = 0; j < 4*n+1; j++) {
                if(j == i) continue;
                if(p[j].x == minX || p[j].x == maxX) continue;
                if(p[j].y == minX || p[j].y == maxY) continue;
                continue outer;
            }
            System.out.println(p[i]);
            return;
        }

        out.close();
    }

    static class Point {
        int x, y;

        public Point(int X, int Y) {
            x = X;
            y = Y;
        }

        public String toString() {
            return x + " " + y;
        }
    }

    static class FS {

        BufferedReader in;
        StringTokenizer token;

        public FS(InputStream str) {
            in = new BufferedReader(new InputStreamReader(str));
        }

        public String next() {
            if (token == null || !token.hasMoreElements()) {
                try {
                    token = new StringTokenizer(in.readLine());
                } catch (IOException ex) {
                }
                return next();
            }
            return token.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Andy Phan
 */
public class c1 {
    public static void main(String[] args) {
        FS in = new FS(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = in.nextInt();
        Point[] p = new Point[4*n+1];
        for(int i = 0; i < 4*n+1; i++) {
            p[i] = new Point(in.nextInt(), in.nextInt());
        }

        outer: for(int i = 0; i < 4*n+1; i++) {
            int minX = 100;
            int minY = 100;
            int maxX = 0;
            int maxY = 0;
            for(int j = 0; j < 4*n+1; j++) {
                if(j == i) continue;
                minX = Math.min(p[j].x, minX);
                minY = Math.min(p[j].y, minY);
                maxX = Math.max(p[j].x, maxX);
                maxY = Math.max(p[j].y, maxY);
            }
            if(maxX-minX != maxY-minY) continue;
            for(int j = 0; j < 4*n+1; j++) {
                if(j == i) continue;
                if(p[j].x == minX || p[j].x == maxX) continue;
                if(p[j].y == minX || p[j].y == maxY) continue;
                continue outer;
            }
            System.out.println(p[i]);
            return;
        }

        out.close();
    }

    static class Point {
        int x, y;

        public Point(int X, int Y) {
            x = X;
            y = Y;
        }

        public String toString() {
            return x + " " + y;
        }
    }

    static class FS {

        BufferedReader in;
        StringTokenizer token;

        public FS(InputStream str) {
            in = new BufferedReader(new InputStreamReader(str));
        }

        public String next() {
            if (token == null || !token.hasMoreElements()) {
                try {
                    token = new StringTokenizer(in.readLine());
                } catch (IOException ex) {
                }
                return next();
            }
            return token.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
    }
}

import java.util.*;
import java.io.*;

public class HeidiAndTheTuringTest {
    public static void main(String[] args) throws IOException
    {
       int N = nextInt();
       int[] xCoords = new int[51];
       int[] yCoords = new int[51];
       int[][] coords = new int[51][2];
       for (int i = 0; i < ((4 * N) + 1); i++)
       {
           int X = nextInt();
           int Y = nextInt();
           xCoords[X]++;
           yCoords[Y]++;
           coords[i] = new int[] {X, Y};
       }
       int bottomX = -1;
       int topX = -1;
       int bottomY = -1;
       int topY = -1;
       for (int i = 0; i < 51; i++)
       {
           if (xCoords[i] > 1 && bottomX == -1)
           {
               bottomX = i;
           }
           if (yCoords[i] > 1 && bottomY == -1)
           {
               bottomY = i;
           }
           if (bottomX != -1)
           {
               if (xCoords[i] > 1)
               {
                   topX = i;
               }
           }
           if (bottomY != -1)
           {
               if (yCoords[i] > 1)
               {
                   topY = i;
               }
           }
       }
       for (int i = 0; i < 51; i++)
       {
           int X = coords[i][0];
           int Y = coords[i][1];
           if (X < topX && X > bottomX && Y < topX && Y > bottomX)
           {
               System.out.println(X + " " + Y);
               break;
           } else if (X > topX || X < bottomX || Y > topY || Y < bottomY)
           {
               System.out.println(X + " " + Y);
               break;
           }
       }

    }

    //Template
    private static StringTokenizer line = new StringTokenizer("");
    private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    private static int nextInt() throws IOException
    {
        return Integer.parseInt(nextString());
    }
    private static long nextLong() throws IOException
    {
        return Long.parseLong(nextString());
    }
    private static String nextString() throws IOException
    {
        if (line.hasMoreTokens())
        {
            return line.nextToken();
        } else {
            line = new StringTokenizer(in.readLine());
            return line.nextToken();
        }
    }
    private static String[] nextStringArray() throws IOException
    {
        return in.readLine().split(" ");
    }
    private static int[] nextIntArray() throws IOException
    {
        return Arrays.stream(nextStringArray()).mapToInt(Integer::parseInt).toArray();
    }
}

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.InputStreamReader;

public class C11184 {

	public static void main(String[] args) throws Exception {
//		BufferedReader br = new BufferedReader(new FileReader("F:/books/input.txt"));
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		Integer n = Integer.parseInt(br.readLine());
		int[] x = new int[51];
		int[] y = new int[51];
		int[] x1 = new int[4*n+1];
		int[] y1 = new int[4*n+1];
		for (int i = 0; i < 4*n+1; i++) {
			String[] s = br.readLine().split(" ");
			x[Integer.parseInt(s[0])]++;
			y[Integer.parseInt(s[1])]++;
			x1[i] = Integer.parseInt(s[0]);
			y1[i] = Integer.parseInt(s[1]);
		}
		int[] ax = new int[] {-1,-1};
		int[] ay = new int[] {-1,-1};
		for (int i = 0; i < 4*n+1; i++) {
			if(x[i]>=n) {
				if(ax[0]==-1) ax[0]=i;
				else ax[1]=i;
			}
			if(y[i]>=n) {
				if(ay[0]==-1) ay[0]=i;
				else ay[1]=i;
			}
		}
		int fx=-1,fy=-1;
		for (int i = 0; i < 4*n+1; i++) {
			if(x1[i]!=ax[0] && x1[i]!=ax[1] && y1[i]!=ay[0] && y1[i]!=ay[1]) {
				fx = x1[i];fy=y1[i];break;
			}
			if(x1[i]<ax[0] || x1[i]>ax[1] || y1[i]<ay[0] || y1[i]>ay[1]) {
				fx = x1[i];fy=y1[i];break;
			}
		}
		System.out.println(fx+" "+fy);
	}

}

import java.io.File;
import java.util.Scanner;
import java.util.StringTokenizer;

public class p039 {
	public static void main(String args[]) throws Exception {
		StringTokenizer stok = new StringTokenizer(new Scanner(System.in).useDelimiter("\\A").next());
		StringBuilder sb = new StringBuilder();
		int n = Integer.parseInt(stok.nextToken());
		int[] x=new int[51],y=new int[51];
		int[] xsum=new int[51],ysum=new int[51];
		for(int i=0;i<4*n+1;i++) {
			x[i]=Integer.parseInt(stok.nextToken());
			y[i]=Integer.parseInt(stok.nextToken());
			xsum[x[i]]++;ysum[y[i]]++;
		}
		int i=0,j=0;
		for(;i<=50;i++) if(xsum[i]>=n+1) break;
		for(;j<=50;j++) if(ysum[j]>=n+1) break;
		for(int k=0;k<4*n+1;k++) {
			if(x[k]>i+n||x[k]<i) exit1(x[k],y[k]);
			if(y[k]>j+n||y[k]<j) exit1(x[k],y[k]);
			if(x[k]>i&&x[k]<i+n) if(y[k]!=j&&y[k]!=j+n) exit1(x[k],y[k]);

		}
	}

	private static void exit1(int i, int j) {
		System.out.println(i+ " "+j);
		System.exit(0);
	}
}

import java.util.*;
import java.lang.*;
import java.io.*;
import static java.lang.Math.*;

public class Solution{

    static StreamTokenizer in1 = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));

    static int nextInt() throws IOException {
        in1.nextToken();
        return (int)in1.nval;
    }

    public static void main (String[] args) throws IOException {
        int n = nextInt();
        Pair a[] = new Pair[4*n+1];

        boolean p[][] = new boolean[51][51];

        for(int i = 0; i<4*n+1; i++){
            a[i] = new Pair(nextInt(), nextInt());
            p[a[i].y][a[i].x] = true;
        }

        Arrays.sort(a, (p1, p2)->p1.x==p2.x?Integer.compare(p1.y, p2.y):Integer.compare(p1.x, p2.x));

        for(int i = 0; i<4*n+1; i++){

            for(int r = 1; r<51; r++){
                int cnt = 0, x = a[i].x, y = a[i].y;
                int xn = x, yn = y;
                boolean c[][] = new boolean[51][51];

                for(int k = 0; k<51; k++){
                    c[k] = p[k].clone();
                }

                for(int i1 = x; i1<min(x+r, 50); i1++){
                    xn++;
                    if(c[yn][xn])cnt++;
                    c[yn][xn] = 1==0;
                }

                for(int i1 = y; i1<min(y+r, 50); i1++){
                    yn++;
                    if(c[yn][xn])cnt++;
                    c[yn][xn] = 1==0;
                }

                for(int i1 = xn; i1>x; i1--){
                    xn--;
                    if(c[yn][xn])cnt++;
                    c[yn][xn] = 1==0;
                }

                for(int i1 = yn; i1>y; i1--){
                    yn--;
                    if(c[yn][xn])cnt++;
                    c[yn][xn] = 1==0;
                }

                if(cnt==4*n){
                    for(int k1 = 0; k1<51; k1++){
                        for(int k2 = 0; k2<51; k2++) if(c[k1][k2]){
                            System.out.println(k2+" "+k1);
                            return;
                        }
                    }
                }

            }
        }

        System.out.println();
    }

    static class Pair{
        int x, y;
        Pair(int a, int b){
            x = a;
            y = b;
        }
    }
}

import java.util.*;
import java.io.*;
import java.text.*;

public class C1_1184 {

	public static int solve (int [] countx,int n)
	{
		int i = 0;
		while (countx[i] == 0)
			i++;
		if (countx[i] != n + 1) {
			return i;
		}
		i++;
		int k = i;
		for (; i < k + n - 1; i++) {
			if (countx[i] != n) {
				return i;
			}
		}
		if (countx[i] != n + 1) {
			return i;
		}
		i++;
		while (countx[i] == 0) {
			i++;
		}
		return i;
	}
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		int n = sc.nextInt();
		int[] countx = new int[51];
		int[] county = new int[51];
		for (int i = 0; i < 4 * n + 1; i++) {
			countx[sc.nextInt()]++;
			county[sc.nextInt()]++;
		}
		pw.println(solve(countx, n)+" "+solve(county, n));
		pw.flush();
		pw.close();
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if (x.charAt(0) == '-') {
				neg = true;
				start++;
			}
			for (int i = start; i < x.length(); i++)
				if (x.charAt(i) == '.') {
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				} else {
					sb.append(x.charAt(i));
					if (dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg ? -1 : 1);
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

	}

}

import java.util.*;

public class Solution {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] sqr = new int[51][51];
        for(int i=0;i<4*n+1;i++){
            int x = sc.nextInt();
            int y = sc.nextInt();
            sqr[x][y] = 1;
        }
        for(int i=0;i<51;i++){
            for(int j=0;j<51;j++){
                if(sqr[i][j]==1){
                    int horizontal_count = 0;
                    int vertical_count   = 0;
                    int tmpi = i;
                    while (i<51 && sqr[tmpi][j]==1){
                        horizontal_count++;
                        tmpi++;
                    }
                    int tmpj = j;
                    while (j<51 && sqr[i][tmpj]==1){
                        vertical_count++;
                        tmpj++;
                    }
                    if(horizontal_count != vertical_count){
                        if(horizontal_count < vertical_count){
                            System.out.println(i + " "+(j+horizontal_count));
                            return;
                        }else {
                            System.out.println((i+vertical_count) + " "+(j));
                            return;
                        }
                    }else{
                        for(int k =i+1;k<i+horizontal_count-1;k++){
                            for(int l =j+1;l<j+vertical_count-1;l++){
                                if(sqr[k][l]==1){
                                    System.out.println(k+" "+l);
                                    return;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

import java.io.*;
import java.util.*;
public class MainClass
{
	public static void main(String args[])throws IOException
	{
	    try
	    {
    		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    		int n=Integer.parseInt(br.readLine());
    		int x[]=new int[(4*n+1)];
    		int y[]=new int[(4*n+1)];
    		int a[]=new int[51];
    		int b[]=new int[51];
    		for(int i=0;i<=4*n;i++)
    		{
    		    String t_input[];
                t_input=br.readLine().split(" ");
                x[i]=Integer.parseInt(t_input[0]);
                y[i]=Integer.parseInt(t_input[1]);
                a[x[i]]++;
                b[y[i]]++;
    		}
    		/*for(int i=0;i<=2;i++)
    		{
    		    System.out.println(a[i]+" "+b[i]);
    		}*/
    		//System.out.println(a[0]+" "+a[2]+" "+b[0]+" "+b[2]);
    		int x1=-1,y1=-1,x2=-1,y2=-1;
    		A:for(int i=50;i>=1;i--)
    		{
    		    for(int j=0;j<=50-i;j++)
    		    {
    		        int p1=j;
    		        int p2=j+i;
    		        int x11=a[p1],x22=a[p2];
    		        for(int k=0;k<=50-i;k++)
    		        {
    		            int p3=k;
    		            int p4=k+i;
    		            int y11=b[p3],y22=b[p4];
    		            if(i==2&&j==0&&k==0)
    		            //System.out.println(x11+" "+x22+" "+y11+" "+y22);
        		        if(x11>=n&&x22>=n&&y11>=n&&y22>=n)
        		        {
        		            x1=p1;x2=p2;y1=p3;y2=p4;
        		            break A;
        		        }
    		        }
    		    }
    		}
    		//System.out.println(x1+" "+x2+" "+y1+" "+y2);
    		for(int i=0;i<=4*n;i++)
    		{
    		    if((x[i]==x1||x[i]==x2)&&(y[i]>=y1&&y[i]<=y2))
    		    {}
    		    else if((y[i]==y1||y[i]==y2)&&(x[i]>=x1&&x[i]<=x2))
    		    {}
    		    else
    		    System.out.println(x[i]+" "+y[i]);
    		}
	    }
		catch(NumberFormatException x){}
	}
}
/*
__________ARRAY INPUT:
String a_input[];
        a_input=br.readLine().split(" ");
        int a[]=new int[n];
        for(int i=0;i<n;i++)
        {
            a[i]=Integer.parseInt(a_input[i]);
        }

__________INPUT FOR TWO SPACE SEPARATED INTEGERS:
String t_input[];
t_input=br.readLine().split(" ");
int n=Integer.parseInt(t_input[0]);
int k=Integer.parseInt(t_input[1]);

__________STRING TO INTEGER ARRAY: ex-12345 to 1,2,3,4,5
String st=br.readLine();
char chars[]=st.toCharArray();
int a[]=new int[st.length()];
for(int i=0;i<st.length();i++)
a[i]=chars[i]-48;

__________ARRAY WITH SPACE SEPARATED INTEGERS:
int a[]=new int[n];
	        String t_input[];
            t_input=br.readLine().split(" ");
            for(int i=0;i<n;i++)
            {
                a[i]=Integer.parseInt(t_input[i]);
            }

__________TO SORT IN DESCENDING: Arrays.sort(b,Collections.reverseOrder());
*/

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskC1 solver = new TaskC1();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC1 {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.nextInt();
            n = n * 4 + 1;
            int m = n / 4;
            int[] x = new int[n];
            int[] y = new int[n];

            for (int i = 0; i < n; i++) {
                x[i] = in.nextInt();
                y[i] = in.nextInt();
            }

            for (int i = 0; i < n; i++) {
                int mnx = Integer.MAX_VALUE, maxx = -1;
                int mny = Integer.MAX_VALUE, maxy = -1;
                for (int j = 0; j < n; j++)
                    if (i != j) {
                        mnx = Integer.min(mnx, x[j]);
                        mny = Integer.min(mny, y[j]);
                        maxx = Integer.max(maxx, x[j]);
                        maxy = Integer.max(maxy, y[j]);
                    }
                int[] cnt = new int[4];
                boolean OK = true;
                boolean there_i = false;
                for (int j = 0; j < n; j++) {
                    boolean ok = false;

                    if (x[j] == mnx && y[j] >= mny && y[j] <= maxy) {
                        cnt[0]++;
                        ok = true;
                    }

                    if (x[j] == maxx && y[j] >= mny && y[j] <= maxy) {
                        cnt[1]++;
                        ok = true;
                    }

                    if (y[j] == mny && x[j] >= mnx && x[j] <= maxx) {
                        cnt[2]++;
                        ok = true;
                    }

                    if (y[j] == maxy && x[j] >= mnx && x[j] <= maxx) {
                        cnt[3]++;
                        ok = true;
                    }
                    if (i == j) there_i = ok;
                    else OK &= ok;
                }
//            if(i == 1)
                if (OK && !there_i && cnt[0] >= m && cnt[1] >= m && cnt[2] >= m && cnt[3] >= m) {
                    System.out.println(Arrays.toString(cnt));
                    out.println(x[i] + " " + y[i]);
                    return;
                }
            }
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void println(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
            writer.print('\n');
        }

        public void close() {
            writer.close();
        }

    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskC1 solver = new TaskC1();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC1 {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.nextInt();
            n = n * 4 + 1;
            int m = n / 4;
            int[] x = new int[n];
            int[] y = new int[n];

            for (int i = 0; i < n; i++) {
                x[i] = in.nextInt();
                y[i] = in.nextInt();
            }

            for (int i = 0; i < n; i++) {
                int mnx = Integer.MAX_VALUE, maxx = -1;
                int mny = Integer.MAX_VALUE, maxy = -1;
                for (int j = 0; j < n; j++)
                    if (i != j) {
                        mnx = Integer.min(mnx, x[j]);
                        mny = Integer.min(mnx, y[j]);
                        maxx = Integer.max(maxx, x[j]);
                        maxy = Integer.max(maxy, y[j]);
                    }
                int[] cnt = new int[4];
                boolean OK = true;
                boolean there_i = false;
                for (int j = 0; j < n; j++) {
                    boolean ok = false;

                    if (x[j] == mnx && y[j] >= mny && y[j] <= maxy) {
                        cnt[0]++;
                        ok = true;
                    }

                    if (x[j] == maxx && y[j] >= mny && y[j] <= maxy) {
                        cnt[1]++;
                        ok = true;
                    }

                    if (y[j] == mny && x[j] >= mnx && x[j] <= maxx) {
                        cnt[2]++;
                        ok = true;
                    }

                    if (y[j] == maxy && x[j] >= mnx && x[j] <= maxx) {
                        cnt[3]++;
                        ok = true;
                    }
                    if (i == j) there_i = ok;
                    else OK &= ok;
                }
//            if(i == 1)
                if (OK && !there_i && cnt[0] >= m && cnt[1] >= m && cnt[2] >= m && cnt[3] >= m) {
                    out.println(x[i] + " " + y[i]);
                    return;
                }
            }
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void println(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
            writer.print('\n');
        }

        public void close() {
            writer.close();
        }

    }
}

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n;
        n = sc.nextInt();

        Set<Point> xpts = new HashSet<>();
        Set<Point> ypts = new HashSet<>();
        Set<Point> pts = new HashSet<>();
        Map<Integer, Set<Point>> xgs = new HashMap<>();
        Map<Integer, Set<Point>> ygs = new HashMap<>();
        for (int i = 0; i < 4*n + 1; i++) {
            int x, y;
            x = sc.nextInt();
            y = sc.nextInt();
            Point pt = Point.of(x, y);
            xpts.add(pt);
            ypts.add(pt);
            pts.add(pt);

            if (xgs.containsKey(x)) {
                Set<Point> ps = xgs.get(x);
                ps.add(pt);
            }
            else {
                Set<Point> ps = new HashSet<>();
                ps.add(pt);
                xgs.put(x, ps);
            }

            if (ygs.containsKey(y)) {
                Set<Point> ps = ygs.get(y);
                ps.add(pt);
            }
            else {
                Set<Point> ps = new HashSet<>();
                ps.add(pt);
                ygs.put(y, ps);
            }
        }

        //System.out.println("xgs: " + xgs);
        //System.out.println("ygs: " + ygs);
        int xl = Integer.MAX_VALUE, xh = 0, yl = Integer.MAX_VALUE, yh = 0;
        for (Map.Entry<Integer, Set<Point>> e : xgs.entrySet()) {
            if (e.getValue().size() < n) {
                continue;
            }

            for (Point p : e.getValue()) {
                xpts.remove(p);
            }

            if (e.getKey() < xl) {
                xl = e.getKey();
            }

            if (e.getKey() > xh) {
                xh = e.getKey();
            }
        }
        for (Map.Entry<Integer, Set<Point>> e : ygs.entrySet()) {
            if (e.getValue().size() < n) {
                continue;
            }

            for (Point p : e.getValue()) {
                ypts.remove(p);
            }

            if (e.getKey() < yl) {
                yl = e.getKey();
            }

            if (e.getKey() > yh) {
                yh = e.getKey();
            }
        }
        //System.out.println("xgs: " + xgs);
        //System.out.println("ygs: " + ygs);

        //System.out.printf("xl: %d, xh: %d, yl: %d, yh: %d\n", xl, xh, yl, yh);
        if (xpts.size() == 1) {
            Point p = new ArrayList<>(xpts).get(0);
            System.out.printf("%d %d", p.x, p.y);
        } else {
            if (ypts.size() == 1) {
            Point p = new ArrayList<>(ypts).get(0);
            System.out.printf("%d %d", p.x, p.y);
            } else {
                boolean found = false;
                for (Point p : pts) {
                    if (p.x != xl && p.x != xh && p.y != yl && p.y != yh) {
                        found = true;
                        System.out.printf("%d %d", p.x, p.y);
                        break;
                    }
                }
                if (!found) {
                    System.out.println("1 1");
                    //System.out.println("X: " + xpts);
                    //System.out.println("Y: " + ypts);
                }
            }
        }
    }

    private static class Point {
        public int x, y;

        Point(int x, int y) {
            this.x = x;
            this.y = y;
        }

        static Point of(int x, int y) {
            return new Point(x, y);
        }

        public String toString() {
            return "Point(x:" + x + ", y:" + y + ")";
        }
    }
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;

/**
 * #
 *
 * @author pttrung
 */
public class C1_Helvetic_2019 {

    public static long MOD = 998244353;
    static int[][] dp;

    public static void main(String[] args) throws FileNotFoundException {
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File(
        // "output.txt")));
        PrintWriter out = new PrintWriter(System.out);
        Scanner in = new Scanner();
        int n = in.nextInt();

        Point[] data = new Point[4 * n + 1];
        for (int i = 0; i < data.length; i++) {
            data[i] = new Point(in.nextInt(), in.nextInt());
        }
        int index = -1;
        for (int i = 0; i < data.length; i++) {
            int minX = Integer.MAX_VALUE, maxX = 0;
            int minY = Integer.MAX_VALUE, maxY = 0;
            for (int j = 0; j < data.length; j++) {
                if (i != j) {
                    minX = Integer.min(minX, data[j].x);
                    maxX = Integer.max(maxX, data[j].x);
                    minY = Integer.min(minY, data[j].y);
                    maxY = Integer.max(maxY, data[j].y);
                }
            }
            boolean ok = !check(data[i], minX, maxX, minY, maxY);
            for (int j = 0; j < data.length && ok; j++) {
                if (i == j) {
                    continue;
                }
                ok = check(data[j], minX, maxX, minY, maxY);
            }
            if (ok) {

                index = i;
                break;
            }
        }
        out.println(data[index].x + " " + data[index].y);
        out.close();
    }

    static boolean check(Point data, int minX, int maxX, int minY, int maxY) {
        boolean ok = true;
        if (data.x == minX || data.x == maxX) {
            ok &= data.y >= minY && data.y <= maxY;
        } else if (data.y == minY || data.y == maxY) {
            ok &= data.x >= minX && data.x <= maxX;
        } else {
            ok = false;
        }
        return ok;
    }

    static int log(int n) {
        int result = 0;
        long st = 1;
        for (int i = 0; st <= n; i++) {

            result = i;

            st *= 2L;
        }
        return result;
    }

    static long abs(long v) {
        return v < 0 ? -v : v;
    }

    static int[] cal(double v) {
        int[] re = new int[2];
        if (v >= 0) {
            re[0] = (int) Math.floor(v);
            re[1] = (int) Math.ceil(v);
        } else {
            re[0] = (int) Math.ceil(v);
            re[1] = (int) Math.floor(v);
        }
        return re;
    }

    public static int[] KMP(String val) {
        int i = 0;
        int j = -1;
        int[] result = new int[val.length() + 1];
        result[0] = -1;
        while (i < val.length()) {
            while (j >= 0 && val.charAt(j) != val.charAt(i)) {
                j = result[j];
            }
            j++;
            i++;
            result[i] = j;
        }
        return result;

    }

    public static boolean nextPer(int[] data) {
        int i = data.length - 1;
        while (i > 0 && data[i] < data[i - 1]) {
            i--;
        }
        if (i == 0) {
            return false;
        }
        int j = data.length - 1;
        while (data[j] < data[i - 1]) {
            j--;
        }
        int temp = data[i - 1];
        data[i - 1] = data[j];
        data[j] = temp;
        Arrays.sort(data, i, data.length);
        return true;
    }

    public static int digit(long n) {
        int result = 0;
        while (n > 0) {
            n /= 10;
            result++;
        }
        return result;
    }

    public static double dist(long a, long b, long x, long y) {
        double val = (b - a) * (b - a) + (x - y) * (x - y);
        val = Math.sqrt(val);
        double other = x * x + a * a;
        other = Math.sqrt(other);
        return val + other;

    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int start, int end) {
            this.x = start;
            this.y = end;
        }

        @Override
        public int hashCode() {
            int hash = 5;
            hash = 47 * hash + this.x;
            hash = 47 * hash + this.y;
            return hash;
        }

        @Override
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            final Point other = (Point) obj;
            if (this.x != other.x) {
                return false;
            }
            if (this.y != other.y) {
                return false;
            }
            return true;
        }

        @Override
        public int compareTo(Point o) {
            return Integer.compare(x, o.x);
        }
    }

    public static class FT {

        long[] data;

        FT(int n) {
            data = new long[n];
        }

        public void update(int index, long value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public long get(int index) {
            long result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

    public static long gcd(long a, long b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static long pow(long a, long b) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2);
        if (b % 2 == 0) {
            return val * val;
        } else {
            return val * (val * a);

        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Jeel Vaishnav
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        C1HeidiAndTheTuringTestEasy solver = new C1HeidiAndTheTuringTestEasy();
        solver.solve(1, in, out);
        out.close();
    }

    static class C1HeidiAndTheTuringTestEasy {
        public void solve(int testNumber, InputReader sc, PrintWriter out) {
            int n = 4 * sc.nextInt();

            Point p[] = new Point[n];
            for (int i = 0; i < n; ++i) {
                p[i] = new Point(sc.nextInt(), sc.nextInt());
            }

            for (int j = 0; j < n; ++j) {
                int flag = 0;
                int minX = Integer.MAX_VALUE, maxX = Integer.MIN_VALUE;
                int minY = Integer.MAX_VALUE, maxY = Integer.MIN_VALUE;
                for (int i = 0; i < n; ++i) {
                    if (i == j)
                        continue;

                    minX = Math.min(minX, p[i].x);
                    maxX = Math.max(maxX, p[i].x);
                    maxY = Math.max(maxY, p[i].y);
                    minY = Math.min(minY, p[i].y);
                }

                for (int i = 0; i < n; ++i) {
                    if (i == j)
                        continue;

                    if (p[i].x == maxX || p[i].x == minX) {
                        if (p[i].y > maxY || p[i].y < minY)
                            flag = 1;
                    } else if (p[i].y == maxY || p[i].y == minY) {
                        if (p[i].x > maxX || p[i].x < minX)
                            flag = 1;
                    } else
                        flag = 1;
                }

                if (flag == 0) {
                    out.print(p[j].x + " " + p[j].y);
                    return;
                }
            }
        }

        class Point {
            int x;
            int y;

            Point(int a, int b) {
                x = a;
                y = b;
            }

        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Jeel Vaishnav
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        C1HeidiAndTheTuringTestEasy solver = new C1HeidiAndTheTuringTestEasy();
        solver.solve(1, in, out);
        out.close();
    }

    static class C1HeidiAndTheTuringTestEasy {
        public void solve(int testNumber, InputReader sc, PrintWriter out) {
            int n = 4 * sc.nextInt() + 1;

            Point p[] = new Point[n];
            for (int i = 0; i < n; ++i) {
                p[i] = new Point(sc.nextInt(), sc.nextInt());
            }

            for (int j = 0; j < n; ++j) {
                int flag = 0;
                int minX = Integer.MAX_VALUE, maxX = Integer.MIN_VALUE;
                int minY = Integer.MAX_VALUE, maxY = Integer.MIN_VALUE;
                for (int i = 0; i < n; ++i) {
                    if (i == j)
                        continue;

                    minX = Math.min(minX, p[i].x);
                    maxX = Math.max(maxX, p[i].x);
                    maxY = Math.max(maxY, p[i].y);
                    minY = Math.min(minY, p[i].y);
                }

                for (int i = 0; i < n; ++i) {
                    if (i == j)
                        continue;

                    if (p[i].x == maxX || p[i].x == minX) {
                        if (p[i].y > maxY || p[i].y < minY)
                            flag = 1;
                    } else if (p[i].y == maxY || p[i].y == minY) {
                        if (p[i].x > maxX || p[i].x < minX)
                            flag = 1;
                    } else
                        flag = 1;
                }

                if (flag == 0) {
                    out.print(p[j].x + " " + p[j].y);
                    return;
                }
            }
        }

        class Point {
            int x;
            int y;

            Point(int a, int b) {
                x = a;
                y = b;
            }

        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}

import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;

public class q5 {

	static boolean checkValid(NoD[] arr, int n) {
		boolean tr=false;
		int lowx=51,highx=-1,lowy=51,highy=-1;
		for(int i=0;i<4*n;i++) {
			lowx=Math.min(lowx, arr[i].x);
			lowy=Math.min(lowy, arr[i].y);
			highx=Math.max(highx, arr[i].x);
			highy=Math.max(highy, arr[i].y);
		}
		int included[]=new int[4*n];
		int count=0;
		int[][] v=new int[4][2];
		int[] indi=new int[4];
		for(int i=0;i<4;i++) {
			v[i][0]=51;
			v[i][1]=-1;
		}
		for(int i=0;i<4*n;i++) {
			if(arr[i].x==lowx) {
				indi[0]++;
				if(included[i]==0) {
					included[i]=1;count++;
				}
				v[0][0]=Math.min(v[0][0], arr[i].y);
				v[0][1]=Math.max(v[0][1], arr[i].y);
			}
			if(arr[i].x==highx) {
				indi[1]++;
				if(included[i]==0) {
					included[i]=1;count++;
				}
				v[1][0]=Math.min(v[0][0], arr[i].y);
				v[1][1]=Math.max(v[0][1], arr[i].y);
			}
			if(arr[i].y==lowy) {
				indi[2]++;
				if(included[i]==0) {
					included[i]=1;count++;
				}
				v[2][0]=Math.min(v[0][0], arr[i].x);
				v[2][1]=Math.max(v[0][1], arr[i].x);
			}
			if(arr[i].y==highy) {
				indi[3]++;
				if(included[i]==0) {
					included[i]=1;count++;
				}
				v[3][0]=Math.min(v[0][0], arr[i].x);
				v[3][1]=Math.max(v[0][1], arr[i].x);
			}
		}
		if(count==4*n && indi[0]>=n && indi[1]>=n && indi[2]>=n && indi[3]>=n) {
			if(v[0][0]>=lowy && v[0][1]<=highy) {
				if(v[1][0]>=lowy && v[1][1]<=highy) {
					if(v[2][0]>=lowx && v[2][1]<=highx) {
						if(v[3][0]>=lowx && v[3][1]<=highx) {
							tr=true;
						}
					}
				}
			}
			//tr=true;
		}

		return tr;
	}

	public static void main(String[] args) throws IOException {

	Reader.init(System.in);
	PrintWriter out=new PrintWriter(System.out);
	int n=Reader.nextInt();
	NoD[] arr=new NoD[4*n+1];
	for(int i=0;i<4*n+1;i++) {
		arr[i]=new NoD(Reader.nextInt(),Reader.nextInt());
	}
	for(int i=0;i<4*n+1;i++) {
		NoD[] a2=new NoD[4*n];
		int index=0;
		for(int j=0;j<4*n+1;j++) {
			if(j!=i) {
				a2[index++]=arr[j];
			}
		}
		if(i==4) {
			i=4;
		}
		if(checkValid(a2,n)) {
			out.println(arr[i].x+" "+arr[i].y);break;
		}
	}

	out.flush();

	}
}

class NoD{
	int x,y;
	NoD(int a,int b){
		x=a;y=b;
	}
}

class Reader {
    static BufferedReader reader;
    static StringTokenizer tokenizer;
    /** call this method to initialize reader for InputStream */
    static void init() throws IOException {
    	 reader = new BufferedReader(
                 new FileReader("pattern.in") );
    tokenizer = new StringTokenizer("");
    }
    static void init(InputStream input) {
        reader = new BufferedReader(
                     new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }
    /** get next word */
    static String nextLine() throws IOException{
    	return reader.readLine();
    }
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                   reader.readLine() );
        }
        return tokenizer.nextToken();
    }
    static int nextInt() throws IOException {
        return Integer.parseInt( next() );
    }
    static long nextLong() throws IOException {
        return Long.parseLong( next() );
    }
    static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    }
}

import java.util.Scanner;

/**
 *
 * @author sina
 */
public class ACMC1 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
       Scanner in=new Scanner(System.in);
       int l=in.nextInt();
        for (int i = 0; i < 4*l+1; i++) {
            int x=in.nextInt();
            int y=in.nextInt();;
            if(x!=l&&y!=l&&x!=0&&y!=0)
            {
                System.out.println(x+" "+y);
                break;
            }
            else if(x>l||y>l)
            {
                System.out.println(x+" "+y);
                break;
            }
        }
    }

}

import java.util.Scanner;

/**
 *
 * @author sina
 */
public class ACMC1 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
       Scanner in=new Scanner(System.in);
       int n=in.nextInt();
       int[] x=new int[4*n+1];
       int[] y=new int[4*n+1];
       int[] max=new int[4*n+1];
       int cou=0;
       for (int i = 0; i < 4*n+1; i++) {
            x[i]=in.nextInt();
            y[i]=in.nextInt();

       }
       int l;
       if(x[4*n]==x[4*n-1])
       {
           l=x[4*n];
       }
       else
       {
           l=x[4*n-2];
       }
       for (int i = 0; i < 4*n+1; i++) {
            if(x[i]!=l&&y[i]!=l&&x[i]!=0&&y[i]!=0)
            {
                System.out.println(x[i]+" "+y[i]);
                break;
            }
            else if(x[i]>l||y[i]>l)
            {
                System.out.println(x[i]+" "+y[i]);
                break;
            }
        }
    }

}

import java.util.Scanner;

/**
 *
 * @author sina
 */
public class ACMC1 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
       Scanner in=new Scanner(System.in);
       int n=in.nextInt();
       int[] x=new int[4*n+1];
       int[] y=new int[4*n+1];
       int maxX=0;
       int maxY=0;
       int maxOX=0;
       int maxOY=0;
       for (int i = 0; i < 4*n+1; i++) {
            x[i]=in.nextInt();
            y[i]=in.nextInt();
            if(x[i]!=y[i])
            {
                if(maxOX<x[i]){
                    if(x[i]>=maxX)
                    {
                        maxOX=maxX;
                        maxX=x[i];
                    }
                    else
                    {
                        maxOX=x[i];
                    }
                }

                if(maxOY<y[i]){
                    if(y[i]>=maxY)
                    {
                        maxOY=maxY;
                        maxY=y[i];
                    }
                    else
                    {
                        maxOY=y[i];
                    }
                }
            }
       }
           int l=Math.min(maxOX, maxOY);
       for (int i = 0; i < 4*n+1; i++) {
            if(x[i]!=l&&y[i]!=l&&x[i]!=0&&y[i]!=0)
            {
                System.out.println(x[i]+" "+y[i]);
                break;
            }
            else if(x[i]>l||y[i]>l)
            {
                System.out.println(x[i]+" "+y[i]);
                break;
            }
        }
    }

}

import java.util.Scanner;

/**
 *
 * @author sina
 */
public class ACMC1 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
       Scanner in=new Scanner(System.in);
       int n=in.nextInt();
       int[] x=new int[4*n+1];
       int[] y=new int[4*n+1];
       int[] max=new int[4*n+1];
       int cou=0;
       for (int i = 0; i < 4*n+1; i++) {
            x[i]=in.nextInt();
            y[i]=in.nextInt();

       }
        for (int j = 0; j < 4*n+1; j++) {
            for (int i = 0; i < 4*n; i++) {
                if(x[i]>x[i+1])
                {
                    int temp=x[i];
                   x[i]=x[i+1];
                   x[i+1]=temp;
                   temp=y[i];
                   y[i]=y[i+1];
                   y[i+1]=temp;
                }
            }
        }
       int l;
       if(x[4*n]==x[4*n-1])
       {
           l=x[4*n];
       }
       else
       {
           l=x[4*n-2];
       }
       for (int i = 0; i < 4*n+1; i++) {
            if(x[i]!=l&&y[i]!=l&&x[i]!=0&&y[i]!=0)
            {
                System.out.println(x[i]+" "+y[i]);
                break;
            }
            else if(x[i]>l||y[i]>l)
            {
                System.out.println(x[i]+" "+y[i]);
                break;
            }
        }
    }

}

import java.util.Scanner;

/**
 *
 * @author sina
 */
public class ACMC1 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
       Scanner in=new Scanner(System.in);
       int n=in.nextInt();
       int[] x=new int[4*n+1];
       int[] y=new int[4*n+1];
       int maxX=0;
       int maxY=0;
       int maxOX=0;
       int maxOY=0;
       for (int i = 0; i < 4*n+1; i++) {
            x[i]=in.nextInt();
            y[i]=in.nextInt();
            if(x[i]!=y[i])
            {
                if(x[i]>=maxX)
                {
                    maxOX=maxX;
                    maxX=x[i];
                }
                if(y[i]>=maxY)
                {
                    maxOY=maxY;
                    maxY=y[i];
                }
            }
       }
       int l=Math.min(maxOX, maxOY);
       for (int i = 0; i < 4*n+1; i++) {
            if(x[i]!=l&&y[i]!=l&&x[i]!=0&&y[i]!=0)
            {
                System.out.println(x[i]+" "+y[i]);
                break;
            }
            else if(x[i]>l||y[i]>l)
            {
                System.out.println(x[i]+" "+y[i]);
                break;
            }
        }
    }

}