#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const long long INF = 1e12;
const int MOD = 1e9 + 7;
const unsigned long long BIT_FLAG_0 = (1 << 0);
const unsigned long long BIT_FLAG_1 = (1 << 1);
const unsigned long long BIT_FLAG_2 = (1 << 2);
const unsigned long long BIT_FLAG_3 = (1 << 3);
const unsigned long long BIT_FLAG_4 = (1 << 4);
const unsigned long long BIT_FLAG_5 = (1 << 5);
const unsigned long long BIT_FLAG_6 = (1 << 6);
const unsigned long long BIT_FLAG_7 = (1 << 7);
const long long dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
const long long Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1},
                Dy[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
long long in() {
  long long x;
  cin >> x;
  return x;
}
void print() { cout << "\n"; }
template <class Head, class... Tail>
void print(Head &&head, Tail &&...tail) {
  cout << head;
  if (sizeof...(tail) != 0) cout << " ";
  print(forward<Tail>(tail)...);
}
template <class T>
void print(vector<T> &vec) {
  for (auto &a : vec) {
    cout << a;
    if (&a != &vec.back()) cout << " ";
  }
  cout << "\n";
}
template <class T>
void print(set<T> &set) {
  for (auto &a : set) {
    cout << a << " ";
  }
  cout << "\n";
}
template <class T>
void print(vector<vector<T>> &df) {
  for (auto &vec : df) {
    print(vec);
  }
}
long long power(long long x, long long n) {
  long long ret = 1;
  while (n > 0) {
    if (n & 1) ret *= x;
    x *= x;
    n >>= 1;
  }
  return ret;
}
long long comb(long long n, long long k) {
  vector<vector<long long>> v(n + 1, vector<long long>(n + 1, 0));
  for (long long i = 0; i < (long long)((v).size()); i++) {
    v[i][0] = 1;
    v[i][i] = 1;
  }
  for (long long k = 1; k < (long long)((v).size()); k++) {
    for (long long j = 1; j < k; j++) {
      v[k][j] = (v[k - 1][j - 1] + v[k - 1][j]);
    }
  }
  return v[n][k];
}
void add(long long &a, long long b) {
  a += b;
  if (a >= MOD) a -= MOD;
}
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
__attribute__((constructor)) void faster_io() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
}
long long n;
signed main() {
  cin >> n;
  vector<long long> xs(n), ys(n);
  for (long long ni = 0; ni < (long long)(n); ni++) {
    cin >> xs[ni] >> ys[ni];
  }
  for (long long ni = 0; ni < (long long)(n); ni++) {
    xs.push_back(xs[ni]);
    ys.push_back(ys[ni]);
  }
  if (n % 2 == 1) {
    print("NO");
    exit(0);
  }
  bool identity = true;
  long long centerx = xs[0] + xs[n / 2], centery = ys[0] + ys[n / 2];
  for (long long ni = 0; ni < (long long)(n / 2); ni++) {
    long long x1 = xs[ni], y1 = ys[ni];
    long long x2 = xs[ni + n / 2], y2 = ys[ni + n / 2];
    if (x1 + x2 == centerx and y1 + y2 == centery) {
      continue;
    }
    identity = false;
    break;
  }
  if (identity) {
    print("YES");
  } else {
    print("NO");
  }
  return 0;
}
