#include <bits/stdc++.h>
using namespace std;
const auto gcu = getchar_unlocked;
const auto pcu = putchar_unlocked;
template <typename T>
inline T in(int c) noexcept {
  T n = 0;
  int m = 1;
  while (isspace(c)) {
    c = gcu();
  }
  if (c == '-') m = -1, c = gcu();
  do {
    n = 10 * n + (c - '0'), c = gcu();
  } while (c >= '0' && c <= '9');
  return m * n;
}
inline int in() noexcept { return in<int>(gcu()); }
template <typename T>
inline bool scan(T &n) noexcept {
  int c = gcu();
  return c == EOF ? false : (n = in<T>(c), true);
}
inline bool scan(char &c) noexcept {
  c = gcu();
  gcu();
  return c != EOF;
}
template <typename H, typename... T>
inline bool scan(H &h, T &&...t) noexcept {
  return scan(h) && scan(t...);
}
inline void out(bool b) noexcept { pcu('0' + b); }
inline void out(const char *s) noexcept {
  while (*s) pcu(*s++);
}
inline void out(char c) noexcept { pcu(c); }
template <typename T>
inline void out(T n) noexcept {
  static char b[20];
  char *p = b, m = n < 0 ? pcu('-'), -1 : 1;
  if (!n)
    *p++ = '0';
  else
    while (n) *p++ = n % 10 * m + '0', n /= 10;
  while (p != b) pcu(*--p);
}
inline void outl() noexcept { out('\n'); }
template <typename H, typename... T>
inline void out(H &&h, T &&...t) noexcept {
  out(h);
  out(move(t)...);
}
template <typename... T>
inline void outl(T &&...t) noexcept {
  out(move(t)...);
  outl();
}
using P = complex<int>;
struct hash_complex {
  inline size_t operator()(const P &p) const {
    return (p.real() << 32) + p.imag();
  }
};
int main() {
  for (int m; (m = in());) {
    vector<P> p(m - 1);
    P z = {in(), in()};
    for (P &x : p) x = P{in(), in()} - z;
    unordered_set<P, hash_complex> S;
    for (int n = in(); n--;) S.insert(P{in(), in()});
    for (P s : S)
      if ([&] {
            for (P i : p)
              if (!S.count(s + i)) return false;
            return true;
          }()) {
        P r = s - z;
        outl(r.real(), ' ', r.imag());
        break;
      }
  }
}
