#include <bits/stdc++.h>
using namespace std;
void fastscan(long long &x) {
  bool neg = false;
  register long long c;
  x = 0;
  c = getchar();
  if (c == '-') {
    neg = true;
    c = getchar();
  }
  for (; (c > 47 && c < 58); c = getchar()) x = (x << 1) + (x << 3) + c - 48;
  if (neg) x *= -1;
}
string alpha = "abcdefghijklmnopqrstuvwxyz";
const long long mod = 1e9 + 7;
const long long inf = 2e18 + 5;
const long long nax = 100010;
const long long mod1 = 998244353;
vector<long long> adj[1001];
vector<bool> vis(1001, false);
vector<long long> dist(1001);
vector<bool> binary(long long n) {
  vector<bool> res;
  while (n > 0) {
    res.push_back(n % 2);
    n /= 2;
  }
  reverse(res.begin(), res.end());
  return res;
}
long long power(long long x) {
  if (x == 0) return 1;
  if (x == 1) return 2;
  if (x % 2 == 0) {
    long long res = power(x / 2);
    return res * res;
  } else {
    long long res = power((x - 1) / 2);
    return res * res * 2;
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<pair<long long, long long>> point(n);
  for (long long i = (0); i < (n); i++) {
    long long x, y;
    cin >> x >> y;
    point[i] = {x, y};
  }
  if (n & 1) {
    cout << "NO" << '\n';
    return 0;
  }
  for (long long i = (0); i < (n / 2); i++) {
    if ((point[0].first + point[n / 2].first !=
         point[i].first + point[i + n / 2].first) ||
        (point[0].second + point[n / 2].second !=
         point[i].second + point[i + n / 2].second)) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES" << '\n';
  return 0;
}
