#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
const long double pi = acos(-1.0);
const long double eps = 1e-5;
const int INF = 0x3f3f3f3f;
const long long INFLL = 0x3f3f3f3f3f3f3f3f;
struct poi {
  double x, y;
} p[200010];
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  for (int i = (1); i <= (n); i++) cin >> p[i].x >> p[i].y;
  if (n & 1) {
    cout << "NO";
    return 0;
  }
  poi c;
  c.x = (p[1].x + p[n / 2 + 1].x) / 2;
  c.y = (p[1].y + p[n / 2 + 1].y) / 2;
  for (int i = (2); i <= (n / 2); i++) {
    if (fabs((p[i].x + p[i + n / 2].x) / 2 - c.x) < eps &&
        fabs((p[i].y + p[i + n / 2].y) / 2 - c.y) < eps)
      ;
    else {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
