#include <bits/stdc++.h>
using namespace std;
int val(vector<int> a) {
  int cur = a[0];
  for (int i = 1; i < a.size(); i++) {
    cur = (a[i] | cur) - a[i];
  }
  return cur;
}
int brute(vector<int> a) {
  vector<int> P(a.size());
  for (int i = 0; i < a.size(); i++) {
    P[i] = i;
  }
  int ans = 0;
  vector<int> f;
  do {
    vector<int> b = a;
    for (int i = 0; i < b.size(); i++) {
      b[i] = a[P[i]];
    }
    if (ans < val(b)) f = b;
    ans = max(ans, val(b));
  } while (next_permutation((P).begin(), (P).end()));
  return ans;
}
pair<long long, long long> vec(pair<long long, long long> P,
                               pair<long long, long long> Q) {
  return {P.first - Q.first, P.second - Q.second};
}
bool okay(pair<long long, long long> P1, pair<long long, long long> P2,
          pair<long long, long long> P3, pair<long long, long long> P4) {
  return vec(P1, P2) == vec(P3, P4);
}
int main() {
  int n;
  cin >> n;
  vector<pair<long long, long long> > P(n);
  for (int i = 0; i < n; i++) {
    cin >> P[i].first >> P[i].second;
  }
  if (n % 2) {
    cout << "no";
    return 0;
  }
  P.push_back(P[0]);
  for (int i = 0; i < n / 2; i++) {
    if (okay(P[i], P[i + 1], P[n / 2 + i + 1], P[n / 2 + i]) ||
        okay(P[i], P[i + 1], P[n / 2 + i], P[n / 2 + i + 1])) {
      continue;
    }
    cout << "no";
    return 0;
  }
  cout << "yes";
  return 0;
}
