#include <bits/stdc++.h>
using namespace std;
class Point {
 public:
  int x, y;
  Point(int x = 0, int y = 0) : x(x), y(y) {}
  Point operator+(Point p) { return Point(x + p.x, y + p.y); }
  Point operator-(Point p) { return Point(x - p.x, y - p.y); }
  bool operator==(const Point &p) const { return (x == p.x && y == p.y); }
};
class Constellation {
 public:
  vector<Point> stars;
  void move(int x, int y) {
    Point p(x, y);
    for (int i = 0; i < stars.size(); i++) {
      stars[i] = stars[i] + p;
    }
  }
  bool doesMatch(vector<Point> v) {
    for (int i = 0; i < stars.size(); i++) {
      int j;
      for (j = 0; j < v.size(); j++) {
        if (stars[i] == v[j]) break;
      }
      if (j == v.size()) return false;
    }
    return true;
  }
};
int main() {
  int i, n, m, x, y;
  Constellation c;
  vector<Point> s;
  while (1) {
    cin >> m;
    if (m == 0) break;
    for (i = 0; i < m; i++) {
      cin >> x >> y;
      Point p(x, y);
      c.stars.push_back(p);
    }
    cin >> n;
    for (i = 0; i < n; i++) {
      cin >> x >> y;
      Point p(x, y);
      s.push_back(p);
    }
    int diffx, diffy;
    for (i = 0; i < n; i++) {
      diffx = s[i].x - c.stars[0].x;
      diffy = s[i].y - c.stars[0].y;
      c.move(diffx, diffy);
      if (c.doesMatch(s)) {
        cout << diffx << " " << diffy << endl;
        break;
      }
      c.move(-1 * diffx, -1 * diffy);
    }
  }
  return 0;
}
