#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b);
long long int power(long long int x, long long int y, long long int m);
long long int modInverse(long long int a, long long int m) {
  return power(a, m - 2, m);
}
long long int power(long long int x, long long int y, long long int m) {
  if (y == 0) return 1;
  long long int p = power(x, y / 2, m) % m;
  p = (p * p) % m;
  return (y % 2 == 0) ? p : (x * p) % m;
}
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long int countSetBits(long long int n) {
  long long int count = 0;
  while (n) {
    count += n & 1;
    n >>= 1;
  }
  return count;
}
long long int cal(pair<long long int, long long int> p1,
                  pair<long long int, long long int> p2) {
  long long int sum =
      pow(p1.first - p2.first, 2) + pow(p2.second - p1.second, 2);
  return sum;
}
double cal1(pair<long long int, long long int> p1,
            pair<long long int, long long int> p2) {
  double x1 = p1.first;
  double x2 = p2.first;
  double y1 = p1.second;
  double y2 = p2.second;
  return (y2 - y1) / (x2 - x1);
}
int main() {
  long long int n, i, x, y;
  cin >> n;
  vector<pair<long long int, long long int> > v;
  vector<long long int> v1;
  vector<double> v2;
  for (i = 0; i < n; i++) {
    cin >> x >> y;
    v.push_back(make_pair(x, y));
  }
  if (n % 2 == 1) {
    cout << "NO" << endl;
    exit(0);
  } else {
    for (i = 0; i < n - 1; i++) {
      v1.push_back(cal(v[i], v[i + 1]));
      v2.push_back(cal1(v[i], v[i + 1]));
    }
  }
  v1.push_back(cal(v[0], v[n - 1]));
  v2.push_back(cal1(v[n - 1], v[0]));
  long long int f = 0;
  for (i = 0; i < n / 2; i++) {
    if (v1[i] != v1[i + n / 2]) f = 1;
  }
  for (i = 0; i < n / 2; i++) {
    if (v2[i] == v2[i + n / 2] and f == 0) {
      cout << "YES" << endl;
      exit(0);
    }
  }
  cout << "NO" << endl;
}
