#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 10;
const long long int LINF = 1LL * INF * INF;
const int MAXN = 2e5 + 10;
const int MAXM = 5e3 + 10;
priority_queue<int> pq;
vector<vector<int> > graph;
queue<int> que;
pair<long long int, long long int> A[MAXN];
char S[MAXN];
bool ok(int a, int b, int x, int y) {
  long long int abx = A[a].first - A[b].first;
  long long int aby = A[a].second - A[b].second;
  long long int xyx = A[x].first - A[y].first;
  long long int xyy = A[x].second - A[y].second;
  if ((!abx) && (!xyx))
    return true;
  else if ((!abx))
    return false;
  else if (!xyx)
    return false;
  long long int disab = abx * abx + aby * aby;
  long long int disxy = xyx * xyx + xyy * xyy;
  if ((disab == disxy) && ((abx * xyy) == (aby * xyx)))
    return true;
  else
    return false;
}
int main() {
  int n, m, k, a, b, x, y, q;
  int sum = 0;
  int cnt = 0;
  int mx = 0;
  int mn = INF;
  int cur = 0, idx = -1;
  int tc;
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> A[i].first >> A[i].second;
  }
  if (n & 1) {
    cout << "NO\n";
    return 0;
  }
  for (int i = 0; i < n; i++) {
    a = i;
    b = (i + 1) % n;
    x = (i + (n >> 1)) % n;
    y = (i + (n >> 1) + 1) % n;
    if (ok(a, b, x, y)) ++cnt;
  }
  if (cnt == n)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
