#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-12;
pair<long long, long long> save[200005];
long long cnt[50];
int main(void) {
  long long n;
  cin >> n;
  if (n & 1) {
    char ch;
    while (cin >> ch)
      ;
    cout << "no";
    return 0;
  }
  for (long long i = 1; i <= n; i++) {
    cin >> save[i].first >> save[i].second;
  }
  long long half = n / 2;
  long double x0 = (save[1].first + save[half + 1].first) / 2.0;
  long double y0 = (save[1].second + save[half + 1].second) / 2.0;
  for (int i = 2; i <= half; i++) {
    if (fabs((save[i].first + save[half + i].first) / 2.0 - x0) < eps &&
        fabs((save[i].second + save[half + i].second) / 2.0 - y0) < eps) {
      ;
    } else {
      cout << "no";
      return 0;
    }
  }
  cout << "yes";
  return 0;
}
