#include <bits/stdc++.h>
using namespace std;
using namespace rel_ops;
const int inf = ~0u >> 2;
const long long INF = ~0ull >> 2;
const double err = 1e-7;
inline long long read() {
  long long x;
  if (scanf("%lld", &x) == -1) exit(0);
  return x;
}
inline double readf() {
  double x;
  if (scanf("%lf", &x) == -1) exit(0);
  return x;
}
template <typename _>
inline _ sqr(_ x) {
  return x * x;
}
mt19937 rnd(time(0));
const int N = 200010;
const int mod = (1 ? 1000000007 : 998244353);
int n;
struct vec {
  double x, y;
  vec(double x = 0, double y = 0) : x(x), y(y) {}
  vec operator-(vec b) { return vec(x - b.x, y - b.y); }
  vec operator+(vec b) { return vec(x + b.x, y + b.y); }
  vec operator*(double k) { return vec(k * x, k * y); }
  bool operator<(vec b) const { return make_pair(x, y) < make_pair(b.x, b.y); }
  double len() { return sqrt(x * x + y * y); }
  double sqr() { return x * x + y * y; }
} a[N];
double cross(vec a, vec b) { return a.x * b.y - a.y * b.x; }
double cross(vec a, vec b, vec c) { return cross(a - b, b - c); }
double dot(vec a, vec b) { return a.x * b.x + a.y * b.y; }
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  if (n % 2 == 1) cout << "No", exit(0);
  for (int i = (0), _ = (n); i < _; i++)
    cin >> a[i].x >> a[i].y, a[i + n] = a[i];
  bool f = 1;
  for (int i = (0), _ = (n / 2); i < _; i++)
    if (((a[i] - a[i + 1]) + (a[i + n / 2] - a[i + 1 + n / 2])).len() < err)
      ;
    else
      f = 0;
  if (f)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
