#include <bits/stdc++.h>
using namespace std;
const long long INF = 2e9;
const long long MOD = 1e9 + 7;
const long long MB = 31;
void solve() {
  long long n;
  cin >> n;
  if (n % 2) {
    cout << "NO";
    return;
  }
  vector<pair<long long, long long>> a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i].first >> a[i].second;
  }
  for (long long i = 0, j = n / 2; j < n; i++, j++) {
    if (a[i].first - a[i + 1].first != a[(j + 1) % n].first - a[j].first ||
        a[i].second - a[i + 1].second != a[(j + 1) % n].second - a[j].second) {
      cout << "NO";
      return;
    }
  }
  cout << "YES";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cout << fixed;
  cout.precision(12);
  solve();
}
