#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:1024000000,1024000000")
inline long long read() {
  char tempt = getchar();
  long long x = 0, f = 0;
  while (tempt < '0' || tempt > '9') f |= tempt == '-', tempt = getchar();
  while (tempt >= '0' && tempt <= '9')
    x = x * 10 + tempt - '0', tempt = getchar();
  return f ? -x : x;
}
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
const long long mod = 1e9 + 7;
const long long N = 1e5 + 10;
pair<long long, long long> a[N];
signed main() {
  long long n;
  n = read();
  vector<pair<long long, long long> > vec(n);
  vector<pair<long long, long long> > com;
  for (auto &i : vec) {
    i.first = read(), i.second = read();
    com.push_back({-i.first, -i.second});
  }
  sort(vec.begin(), vec.end());
  sort(com.begin(), com.end());
  long long dx = vec[0].first - com[0].first;
  string ans = "YES";
  long long dy = vec[0].second - com[0].second;
  for (register long long i = 1; i <= n - 1; i++) {
    if ((vec[i].first - com[i].first != dx) ||
        (vec[i].second - com[i].second != dy)) {
      ans = "NO";
      break;
    }
  }
  cout << ans << endl;
}
