#include <bits/stdc++.h>
using namespace std;
long long mod(long long a) {
  long long c = a % (long long)(1E9 + 7);
  if (c >= 0) return c;
  return c + (long long)(1E9 + 7);
}
long long inf = (long long)1E16;
long long max(long long a, long long b) {
  if (a < b)
    return b;
  else
    return a;
}
long long min(long long a, long long b) {
  if (a > b)
    return b;
  else
    return a;
}
void Max(long long &pos, long long val) { pos = max(pos, val); }
void Min(long long &pos, long long val) { pos = min(pos, val); }
void Add(long long &pos, long long val) { pos = mod(pos + val); }
long double EPS = 1E-9;
template <class T, class S>
inline bool chmax(T &a, S b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T, class S>
inline bool chmin(T &a, S b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
void mod_print(long long k) {
  long long P = 50000;
  for (long long y = 1; y <= P; y++) {
    long long x = mod(y * k);
    if (abs(x) <= P || x + P >= (long long)(1E9 + 7)) {
      if (x + P >= (long long)(1E9 + 7)) {
        x -= (long long)(1E9 + 7);
      }
      cout << x << "/" << y << endl;
      return;
    }
  }
  cout << "nun" << endl;
}
void no() {
  cout << "NO" << endl;
  exit(0);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  if (n % 2 == 1) {
    no();
  }
  long long x[n + 1], y[n + 1];
  for (long long i = 0; i <= n - 1; i++) cin >> x[i] >> y[i];
  x[n] = x[0];
  y[n] = y[0];
  for (long long i = 0; i <= n / 2 - 1; i++) {
    long long j = i + n / 2;
    long long dx1 = x[i + 1] - x[i];
    long long dx2 = x[j + 1] - x[j];
    long long dy1 = y[i + 1] - y[i];
    long long dy2 = y[j + 1] - y[j];
    if (abs(dx1) != abs(dx2)) no();
    if (abs(dy1) != abs(dy2)) no();
    if (dx1 == 0 || dx2 == 0 || dy1 == 0 || dy2 == 0) continue;
    long long c = 0;
    if (dx1 < 0) c++;
    if (dx2 < 0) c++;
    if (dy1 < 0) c++;
    if (dy2 < 0) c++;
    if (c % 2 == 1) no();
  }
  cout << "YES" << endl;
  return 0;
}
