#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<pair<long long, long long>> v(n);
  for (long long i = 0; i < n; i++) cin >> v[i].first >> v[i].second;
  if (n % 2) {
    cout << "NO";
    return 0;
  }
  long long l = 0, r = n / 2;
  long double cx = ((long double)(v[l].first + v[r].first)) / 2.0;
  long double cy = ((long double)(v[l].second + v[r].second)) / 2.0;
  while (r < n) {
    long double dx = ((long double)(v[l].first + v[r].first)) / 2.0;
    long double dy = ((long double)(v[l].second + v[r].second)) / 2.0;
    if (dx != cx || dy != cy) {
      cout << "NO";
      return 0;
    }
    l++, r++;
  }
  cout << "YES";
  return 0;
}
