import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class Sample134 {
	public final List<Point> searchPoints = new ArrayList<Point>();
	public final Set<Point> inputPoints = new HashSet<Point>();

	public void addSearchPoint(int x, int y) {
		searchPoints.add(new Point(x, y));
	}
	public void addInputPoint(int x, int y) {
		inputPoints.add(new Point(x, y));
	}

	public Point calc() {
		Point first = searchPoints.get(0);
		OUTER: for (Point base: inputPoints) {
			int dx = base.x - first.x;
			int dy = base.y - first.y;
			for (int index = 1, max = searchPoints.size(); index < max; index++) {
				Point p = searchPoints.get(index);
				if (!inputPoints.contains(new Point(p.x + dx, p.y + dy))) continue OUTER;
			}
			return new Point(dx, dy);
		}
		throw new IllegalStateException("見つからない。");
	}

	public static class Point {
		public final int x;
		public final int y;

		public Point(int x, int y) {
			this.x = x;
			this.y = y;
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj) return true;
			if (!(obj instanceof Point)) return false;
			Point other = (Point) obj;
			return this.x == other.x && this.y == other.y;
		}
		@Override
		public int hashCode() {
			return x * 17 + y;
		}
	}

	public static void main(String[] args) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		try {
			Sample134 sample = new Sample134();
			int n = Integer.parseInt(reader.readLine());
			for (int index = 0; index < n; index++) {
				String[] point = reader.readLine().split("\\s");
				sample.addSearchPoint(Integer.parseInt(point[0]), Integer.parseInt(point[1]));
			}
			int m = Integer.parseInt(reader.readLine());
			for (int index = 0; index < m; index++) {
				String[] point = reader.readLine().split("\\s");
				sample.addInputPoint(Integer.parseInt(point[0]), Integer.parseInt(point[1]));
			}
			Point p = sample.calc();
			System.out.println(String.format("%d %d", p.x, p.y));
		} catch (IOException ex) {
			ex.printStackTrace();
		}
	}
}
