#include <bits/stdc++.h>
using namespace std;
long long p = 1000000007;
vector<long long> kai;
vector<long long> inv_kai;
long long rui(long long a, long long n, long long mod) {
  if (n == 0) {
    return 1 % mod;
  }
  long long x = rui(a, n / 2, mod);
  x *= x;
  x %= mod;
  if (n % 2 == 1) {
    x *= a;
    x %= mod;
  }
  return x;
}
long long root(long long x, vector<long long>& pa) {
  if (pa[x] == -1) {
    return x;
  }
  long long ans = root(pa[x], pa);
  pa[x] = ans;
  return ans;
}
bool mar(long long x, long long y, vector<long long>& pa) {
  x = root(x, pa);
  y = root(y, pa);
  if (x != y) {
    pa[x] = y;
  }
  return (x != y);
}
long long gcd(long long x, long long y) {
  if (x < y) {
    return gcd(y, x);
  }
  if (y == 0) {
    return x;
  }
  return gcd(y, x % y);
}
long long lcm(long long x, long long y) {
  x = abs(x);
  y = abs(y);
  return x * y / gcd(x, y);
}
long long modinv(long long a, long long m) {
  long long b = m, u = 1, v = 0;
  while (b) {
    long long t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  u %= m;
  if (u < 0) u += m;
  return u;
}
void make_kai(long long max_kai) {
  kai = vector<long long>(max_kai, 1);
  inv_kai = kai;
  for (long long i = 0; i < max_kai - 1; i++) {
    kai[i + 1] = kai[i] * (i + 1);
    kai[i + 1] %= p;
    inv_kai[i + 1] = modinv(kai[i + 1], p);
  }
}
long long com(long long n, long long r) {
  if ((n < 0) || (r < 0) || (r > n)) {
    return 0;
  }
  long long ans = (kai[n] * inv_kai[r]) % p;
  return (ans * inv_kai[n - r]) % p;
}
vector<long long> uni(vector<long long> x) {
  if (x.size() == 0) {
    return x;
  }
  sort(x.begin(), x.end());
  long long n = x.size();
  vector<long long> ans(1, x[0]);
  for (long long j = 1; j < n; j++) {
    if (x[j - 1] != x[j]) {
      ans.push_back(x[j]);
    }
  }
  x = ans;
  return x;
}
void pr(vector<long long>& v) {
  long long n = v.size();
  if (n != 0) {
    cout << v[0];
    for (long long i = 0; i < n - 1; i++) {
      cout << " " << v[i + 1];
    }
    cout << endl;
  }
}
vector<long long> dijk(vector<vector<pair<long long, long long>>>& way,
                       long long st, long long inf) {
  long long n = way.size();
  vector<long long> dist(n, inf);
  dist[st] = 0;
  priority_queue<pair<long long, long long>, vector<pair<long long, long long>>,
                 greater<pair<long long, long long>>>
      pq;
  pq.push(make_pair(0, st));
  vector<bool> is_checked(n, false);
  while (!pq.empty()) {
    pair<long long, long long> x = pq.top();
    pq.pop();
    long long pot = x.second;
    if (!is_checked[pot]) {
      is_checked[pot] = true;
      for (auto y : way[pot]) {
        long long nex_dist = x.first + y.second;
        long long nex_pot = y.first;
        if (dist[nex_pot] > nex_dist) {
          dist[nex_pot] = nex_dist;
          pq.push(make_pair(nex_dist, y.first));
        }
      }
    }
  }
  return dist;
}
vector<long long> mul(vector<long long>& a, vector<long long>& b) {
  long long n = a.size();
  long long m = b.size();
  vector<long long> ans(n + m - 1, 0);
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m; j++) {
      ans[i + j] += a[i] * b[j];
      ans[i + j] %= p;
    }
  }
  return ans;
}
vector<long long> rui_p(vector<long long>& a, long long n) {
  if (n == 0) {
    return {1};
  }
  vector<long long> qans = rui_p(a, n / 2);
  qans = mul(qans, qans);
  if (n % 2 == 1) {
    qans = mul(qans, a);
  }
  return qans;
}
bool is_prime(long long n) {
  if (n == 0 || n == 1) {
    return false;
  }
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
void per(long long& ans) {
  ans %= p;
  if (ans < 0) {
    ans += p;
  }
}
long long count_zero(vector<bitset<50>>& a) {
  long long n = a.size();
  long long now_st = 0;
  for (long long i = 0; i < 300; i++) {
    long long fir_ze = -1;
    for (long long j = now_st; j < n; j++) {
      if (a[j][i]) {
        fir_ze = j;
        break;
      }
    }
    if (fir_ze >= 0) {
      for (long long j = 0; j < n; j++) {
        if (j != fir_ze && a[j][i]) {
          a[j] = a[fir_ze] xor a[j];
        }
      }
      swap(a[now_st], a[fir_ze]);
      now_st++;
    }
  }
  long long ans = 0;
  for (long long i = 0; i < n; i++) {
    bool fl = true;
    for (long long j = 0; j < 300; j++) {
      if (a[i][j]) {
        fl = false;
        break;
      }
    }
    if (fl) {
      ans++;
    }
  }
  return ans;
}
long long inf = 10000;
long long linf = 10000;
pair<long long, long long> p_mul(pair<long long, long long> a,
                                 pair<long long, long long> b) {
  pair<long long, long long> c =
      make_pair(max(b.first, a.first + b.second), a.second + b.second);
  return c;
}
vector<vector<pair<long long, long long>>> m_mul(
    vector<vector<pair<long long, long long>>>& a,
    vector<vector<pair<long long, long long>>>& b) {
  long long n = a.size();
  vector<vector<pair<long long, long long>>> c(
      n, vector<pair<long long, long long>>(n, make_pair(-inf, -inf)));
  long long ze = 0;
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < n; j++) {
      for (long long k = 0; k < n; k++) {
        if (a[i][j].second > -linf && b[j][k].second > -linf) {
          pair<long long, long long> x = p_mul(a[i][j], b[j][k]);
          c[i][k].first = max(c[i][k].first, x.first);
          c[i][k].second = max(c[i][k].second, x.second);
          c[i][k].first = max(c[i][k].first, ze);
        }
      }
    }
  }
  return c;
}
vector<vector<long long>> disj_min(vector<long long>& v) {
  long long n = v.size();
  vector<vector<long long>> ret(22, vector<long long>(n));
  ret[0] = v;
  for (long long i = 0; i < 21; i++) {
    for (long long j = 0; j < n; j++) {
      long long nex = j + (1 << i);
      if (nex < n) {
        ret[i + 1][j] = min(ret[i][j], ret[i][nex]);
      } else {
        ret[i + 1][j] = ret[i][j];
      }
    }
  }
  return ret;
}
vector<vector<long long>> disj_max(vector<long long>& v) {
  long long n = v.size();
  vector<vector<long long>> ret(20, vector<long long>(n));
  ret[0] = v;
  for (long long i = 0; i < 19; i++) {
    for (long long j = 0; j < n; j++) {
      long long nex = j + (1 << i);
      if (nex < n) {
        ret[i + 1][j] = max(ret[i][j], ret[i][nex]);
      } else {
        ret[i + 1][j] = ret[i][j];
      }
    }
  }
  return ret;
}
long long find_min(vector<vector<long long>>& dv, long long l, long long r) {
  long long i = 19;
  while (l + (1 << i) > r) {
    i--;
  }
  return min(dv[i][l], dv[i][r - (1 << i)]);
}
long long find_max(vector<vector<long long>>& dv, long long l, long long r) {
  long long i = 19;
  while (l + (1 << i) > r) {
    i--;
  }
  return max(dv[i][l], dv[i][r - (1 << i)]);
}
void pri(long long x, long long y, long long z, long long w) {
  cout << x << "," << 500 << "," << 60 << "," << 60 << ",";
  cout << y << "," << 500 << "," << 60 << "," << 60;
  for (long long i = 0; i < 5; i++) {
    if (i != z) {
      cout << "," << 0;
    } else {
      cout << "," << w;
    }
  }
  cout << endl;
}
signed main() {
  long long n;
  cin >> n;
  vector<long long> x(n), y(n);
  vector<pair<long long, long long>> xy(n);
  long long sx = 0, sy = 0;
  for (long long i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
    sx += x[i];
    sy += y[i];
    xy[i] = make_pair(x[i], y[i]);
  }
  sort(xy.begin(), xy.end());
  sx *= 2;
  sy *= 2;
  if (sx % n != 0 || sy % n != 0) {
    cout << "NO" << endl;
    return 0;
  }
  sx /= n;
  sy /= n;
  for (long long i = 0; i < n; i++) {
    pair<long long, long long> anti = xy[i];
    anti.first = sx - anti.first;
    anti.second = sy - anti.second;
    if (!binary_search(xy.begin(), xy.end(), anti)) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
