#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<pair<long long, long long>> v;
  for (long long i = 0; i < n; i++) {
    long long a, b;
    cin >> a >> b;
    v.push_back(make_pair(a, b));
  }
  if (n & 1)
    cout << "no";
  else {
    int flag = 0;
    for (long long i = 1; i <= n / 2 - 1; i++) {
      if ((v[i - 1].first + v[i - 1 + n / 2].first ==
           v[i].first + v[i + n / 2].first) &&
          (v[i - 1].second + v[i - 1 + n / 2].second ==
           v[i].second + v[i + n / 2].second)) {
        continue;
      } else {
        flag++;
        break;
      }
    }
    if (flag)
      cout << "no";
    else
      cout << "yes";
    return 0;
  }
}
