#include <bits/stdc++.h>
using namespace std;
int n, bj, x_0, y_0;
struct node {
  int x;
  int y;
} N[100010];
int cmp(node a, node b) {
  if (a.x == b.x) return a.y < b.y;
  return a.x < b.x;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &N[i].x, &N[i].y);
    x_0 = x_0 + N[i].x;
    y_0 = y_0 + N[i].y;
  }
  sort(N + 1, N + 1 + n, cmp);
  if (n % 2 == 0) {
    for (int i = 1; i <= n / 2; i++) {
      if ((N[i].x + N[n + 1 - i].x) * (n / 2) != x_0 ||
          ((N[i].y + N[n + 1 - i].y) * (n / 2)) != y_0) {
        bj = 1;
        break;
      }
    }
  } else {
    if (N[n / 2 + 1].x * n == x_0 && N[n / 2 + 1].y * n == y_0) {
      for (int i = 1; i <= n / 2; i++) {
        if ((N[i].x + N[n + 1 - i].x) * (n - 1) / 2 + N[n / 2 + 1].x != x_0 ||
            ((N[i].y + N[n + 1 - i].y) * (n - 1) / 2) + N[n / 2 + 1].y != y_0) {
          bj = 1;
          break;
        }
      }
    } else
      bj = 1;
  }
  if (bj == 1)
    printf("NO\n");
  else
    printf("YES\n");
  return 0;
}
