#include <bits/stdc++.h>
using namespace std;
const long long int mod1 = 1000000007;
const long long int mod2 = 998244353;
long long int gcd(long long int a, long long int b) {
  long long int c;
  while (b) {
    c = b;
    b = a % b;
    a = c;
  }
  return a;
}
long long int power1(long long int a, long long int b) {
  if (b == 0)
    return 1;
  else if (b % 2)
    return a * power1(a, b - 1);
  else {
    long long int temp = power1(a, b / 2);
    return temp * temp;
  }
}
long long int power2(long long int a, long long int b, long long int m) {
  a %= m;
  if (b == 0)
    return 1;
  else if (b % 2)
    return (a * power2(a, b - 1, m)) % m;
  else {
    long long int temp = power2(a, b / 2, m);
    return (temp * temp) % m;
  }
}
long long int mod(long long int x, long long int p) { return (x % p + p) % p; }
long long int lcm(long long int x, long long int y) {
  return (x * y) / gcd(x, y);
}
vector<long long int> fac;
void fact(long long int x) {
  long long int z = x;
  if (z % 2 == 0) {
    fac.push_back(2);
    while (z % 2 == 0) {
      z /= 2;
    }
  }
  x = z;
  for (long long int i = 3; i * i <= x; i += 2) {
    if (z % i == 0) {
      fac.push_back(i);
      while (z % i == 0) {
        z /= i;
      }
    }
  }
  if (z > 2) {
    fac.push_back(z);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int tt = 1;
  while (tt--) {
    long long int n;
    cin >> n;
    pair<long long int, long long int> po[n];
    for (int i = 0; i < n; i++) {
      cin >> po[i].first >> po[i].second;
    }
    if (n % 2 != 0) {
      cout << "NO" << endl;
      continue;
    }
    bool pos = 1;
    pair<long long int, long long int> x = {po[0].first + po[n / 2].first,
                                            po[0].second + po[n / 2].second};
    for (int i = 1; i < n / 2; i++) {
      pair<long long int, long long int> y = {
          po[i].first + po[i + n / 2].first,
          po[i].second + po[i + n / 2].second};
      if (y != x) {
        pos = 0;
        cout << "NO" << endl;
        break;
      }
    }
    if (pos) {
      cout << "YES" << endl;
    }
  }
}
