#include <bits/stdc++.h>
using namespace std;
const long N = 1e5 + 5;
long n;
pair<long, long> a[N], mid;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (long i = 1; i <= n; i++) cin >> a[i].first >> a[i].second;
  if (n & 1) {
    cout << "NO";
    return 0;
  }
  mid.first = a[1].first + a[n / 2 + 1].first;
  mid.second = a[1].second + a[n / 2 + 1].second;
  for (long i = 2; i <= n / 2; i++) {
    if (a[i].first + a[i + n / 2].first != mid.first ||
        a[i].second + a[i + n / 2].second != mid.second) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
