#include <bits/stdc++.h>
using namespace std;
const long long base = 1E9 + 7;
const int N = 200100;
const double ep = 0.0000001;
int n;
long long x[N], y[N];
long long cx = 0, cy = 0;
void fail() {
  cout << "NO";
  exit(0);
}
bool symmetric(int i, int j) {
  long long x1 = cx - x[i] * n;
  long long y1 = cy - y[i] * n;
  long long x2 = cx - x[j] * n;
  long long y2 = cy - y[j] * n;
  return (x1 == -x2) && (y1 == -y2);
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
    cx += x[i];
    cy += y[i];
  }
  if (n % 2 == 1) fail();
  int j = 0;
  for (j = 1; j < n; j++)
    if (symmetric(0, j)) break;
  for (int i = 0; i < n; i++, j++) {
    if (j == n) j = 0;
    if (!symmetric(i, j)) fail();
  }
  cout << "YES";
  return 0;
}
