#include <bits/stdc++.h>
using namespace std;
pair<int, int> arr[100001];
int main() {
  int n, x, y, s = 0, e;
  bool a = false;
  scanf("%d", &n);
  if (n % 2) goto v;
  for (int i = 0; i < n; ++i) {
    scanf("%d %d", &arr[i].first, &arr[i].second);
  }
  sort(arr, arr + n);
  a = true, e = n - 1;
  while (e > s) {
    if (!s)
      x = arr[s].first + arr[e].first, y = arr[s].second + arr[e].second;
    else if (arr[s].first + arr[e].first != x ||
             arr[s].second + arr[e].second != y) {
      a = false;
      break;
    }
    ++s, --e;
  }
v:
  a ? printf("YES") : printf("NO");
}
