#include <bits/stdc++.h>
using namespace std;
struct node {
  int x, y;
} a[100005];
bool cmp(node a1, node a2) {
  if (a1.x < a2.x)
    return true;
  else if (a1.x == a2.x) {
    if (a1.y < a2.y)
      return true;
    else
      return false;
  } else
    return false;
}
int main() {
  int n;
  cin >> n;
  if (n & 1) {
    cout << "NO";
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    cin >> a[i].x >> a[i].y;
  }
  sort(a + 1, a + n + 1, cmp);
  int x = a[1].x + a[n].x;
  int y = a[1].y + a[n].y;
  for (int i = 1; i <= n; i++) {
    if (a[i].x + a[n - i + 1].x != x || a[i].y + a[n - i + 1].y != y) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
