#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
long long int dis(long long int x1, long long int y1, long long int x2,
                  long long int y2) {
  long long int x = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1);
  return x;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cin.exceptions(cin.failbit);
  int T;
  {
    long long int t, n, i, j, x, y, m, l, d, k;
    cin >> n;
    if (n % 2 == 1) {
      cout << "no\n";
      return 0;
    }
    vector<pair<long long, long long> > v(n);
    for (int i = 0; i < (n); ++i) {
      cin >> v[i].first >> v[i].second;
    }
    x = 0;
    for (int i = 0; i < (n / 2); ++i) {
      if (dis(v[i].first, v[i].second, v[i + 1].first, v[i + 1].second) !=
          dis(v[n / 2 + i].first, v[n / 2 + i].second,
              v[(n / 2 + i + 1) % n].first, v[(n / 2 + i + 1) % n].second)) {
        x = 1;
        break;
      }
      if ((v[i + 1].second - v[i].second) *
              (v[(n / 2 + i + 1) % n].first - v[n / 2 + i].first) !=
          (v[i + 1].first - v[i].first) *
              (v[(n / 2 + i + 1) % n].second - v[n / 2 + i].second)) {
        x = 1;
        break;
      }
    }
    if (x == 1)
      cout << "no\n";
    else
      cout << "yes\n";
  }
}
