#include <bits/stdc++.h>
using namespace std;
long long x[100005], y[100005];
long long dis(long long i, long long j) {
  long long d = ((long long)(x[i] - x[j]) * (x[i] - x[j])) +
                ((long long)(y[i] - y[j]) * (y[i] - y[j]));
  return d;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n;
  while (cin >> n) {
    for (long long i = 0; i < n; i++) {
      cin >> x[i] >> y[i];
    }
    if (n % 2) {
      cout << "no\n";
      continue;
    }
    bool f = true;
    for (long long i = 1; i <= (n / 2); i++) {
      if (dis(i, i - 1) == dis((i + n / 2) % n, i - 1 + n / 2))
        if ((x[i] - x[i - 1]) * (y[(i + n / 2) % n] - y[i - 1 + n / 2]) ==
            (y[i] - y[i - 1]) * (x[(i + n / 2) % n] - x[i - 1 + n / 2]))
          continue;
      f = false;
      break;
    }
    if (f)
      cout << "yes\n";
    else
      cout << "no\n";
  }
  return 0;
}
