#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
const int mod = 998244353;
const int inf = 1e9;
const double eps = 1e-16;
const double pi = acos(-1);
inline int read() {
  int p = 0;
  int f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f *= -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    p = p * 10 + ch - '0';
    ch = getchar();
  }
  return p * f;
}
pair<int, int> a[N];
int main() {
  int n = read();
  if (n & 1) {
    puts("NO");
    return 0;
  }
  for (int i = 1; i <= n; i++) a[i].first = read(), a[i].second = read();
  bool bk = 1;
  for (int i = 2; i <= n / 2; i++) {
    pair<int, int> x =
        make_pair(a[i].first - a[i - 1].first, a[i].second - a[i - 1].second);
    pair<int, int> y = make_pair(a[i + n / 2].first - a[i - 1 + n / 2].first,
                                 a[i + n / 2].second - a[i - 1 + n / 2].second);
    if (x.first == -y.first && x.second == -y.second)
      continue;
    else {
      bk = 0;
      break;
    }
  }
  if (bk)
    puts("YES");
  else
    puts("NO");
  return 0;
}
