#pragma GCC optimize("Ofast")
#if 1
#define _USE_MATH_DEFINES
#include "bits/stdc++.h"

using namespace std;

using ll = int64_t;
using db = double;
using ld = long double;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vector<int>>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vpii = vector<pii>;
using vpll = vector<pll>;

constexpr char newl = '\n';

#define FOR(i,a,b) for (int i = (a); i < (b); i++)
#define F0R(i,b) FOR(i,0,b)
#define RFO(i,a,b) for (int i = ((b)-1); i >=(a); i--)
#define RF0(i,b) RFO(i,0,b)
#define show(x) cerr << #x << " = " << (x) << '\n';
#define rng(a) a.begin(),a.end()
#define rrng(a) a.rbegin(),a.rend()
#define sz(x) (int)(x).size()
#define YesNo(x) cout<<((x)?"Yes":"No")<<newl;
#define YESNO(x) cout<<((x)?"YES":"NO")<<newl;
#define v(T) vector<T>
#define vv(T) vector<vector<T>>

template<class A, class B> using umap = unordered_map<A, B>;
template<class A> using uset = unordered_set<A>;

template<typename T1, typename T2> inline void chmin(T1& a, T2 b) { if (a > b) a = b; }
template<typename T1, typename T2> inline void chmax(T1& a, T2 b) { if (a < b) a = b; }
template<class T> bool lcmp(const pair<T, T>& l, const pair<T, T>& r) {
  return l.first < r.first;
}
template<class T> istream& operator>>(istream& i, v(T)& v) {
  F0R(j, sz(v)) i >> v[j];
  return i;
}
template<class A, class B> istream& operator>>(istream& i, pair<A, B>& p) {
  return i >> p.first >> p.second;
}
template<class A, class B, class C> istream& operator>>(istream& i, tuple<A, B, C>& t) {
  return i >> get<0>(t) >> get<1>(t) >> get<2>(t);
}
template<class T> ostream& operator<<(ostream& o, const pair<T, T>& v) {
  o << "(" << v.first << "," << v.second << ")";
  return o;
}
template<class T> ostream& operator<<(ostream& o, const vector<T>& v) {
  F0R(i, v.size()) {
    o << v[i] << ' ';
  }
  o << newl;
  return o;
}
template<class T> ostream& operator<<(ostream& o, const set<T>& v) {
  for (auto e : v) {
    o << e << ' ';
  }
  o << newl;
  return o;
}
template<class T1, class T2> ostream& operator<<(ostream& o, const map<T1, T2>& m) {
  for (auto& p : m) {
    o << p.first << ": " << p.second << newl;
  }
  o << newl;
  return o;
}

constexpr double eps = 1e-5;
int N;

struct Pt {
  db x, y;
  db ata() const {
    return atan2(y, x);
  }
  friend ostream& operator<<(ostream& os, const Pt& p) {
    return os << '(' << p.x << ',' << p.y << ')';
  }
};

v(Pt) read() {
  v(Pt) as(N);
  db cx = 0, cy = 0;
  {
    vpii ab(N);
    F0R(i, N) {
      cin >> ab[i];
      cx += ab[i].first; cy += ab[i].second;
    }
    cx /= N; cy /= N;
    F0R(i, N) {
      as[i] = { ab[i].first - cx,ab[i].second - cy };
    }
  }
  return as;
}

// INSERT ABOVE HERE
signed main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);

  cin >> N;
  auto as = read();
  auto bs = read();
  //show(as);
  //show(bs);
  if (N == 1) {
    cout << "Yes"; return 0;
  }
  int s = 0;
  if (as[0].x == 0 && as[0].y == 0) s++;
  F0R(j, N) {
    //show(j);
    db r = as[s].ata();
    //show(as[0]); show(r);
    db r2 = bs[j].ata();
    //show(bs[j]); show(r2);
    db rot = r2 - r;
    uset<int> us;
    F0R(i, N) {
      // iを回転
      db x = cos(rot) * as[i].x - sin(rot) * as[i].y;
      db y = sin(rot) * as[i].x + cos(rot) * as[i].y;

      // 一致する頂点kを探す
      F0R(k, N) {
        if (abs(x - bs[k].x) < eps && abs(y - bs[k].y) < eps) {
          //if (i==0) show(k);
          us.insert(k); break;
        }
      }
    }
    if (sz(us) == N) {
      cout << "Yes"; return 0;
    }
  }
  cout << "No";
}
#endif

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define rep(i, n) for(int i = 0; i < (int)(n); i ++)
#define rrep(i, n) for(int i = (int)(n) - 1; i >= 0; i --)
#define pii pair<int, int>
#define pll pair<ll, ll>
#define vi vector<int>
#define vll vector<ll>
#define vpi vector<pii>
#define vpll vector<pll>
#define sll set<ll>
#define spll set<pll>
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define mod 1000000007
#define mod2 998244353
#define inf 1000000000000000000
#define pi acos(-1)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define Sort(a) sort(a.begin(), a.end())
#define Rsort(a) sort(a.rbegin(), a.rend())
#define print(x) for(auto i : (x)) cout << i << " "; cout << endl
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
const ll dx[] = {-1,0,1,0,-1,-1,1,1};
const ll dy[] = {0,-1,0,1,-1,1,-1,1};

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << setprecision(15) << fixed;

    ll a, b, c, d;
    vll v(4);
    cin >> v[0] >> v[1] >> v[2] >> v[3];
    rep(i, pow(2, 4)) {
        ll x = 0, y = 0;
        rep(j, 4) {
            if ((i >> j) & 1) x += v[j];
            else y += v[j];
        }
        if (x == y) {
            cout << "Yes" << endl;
            return 0;
        }
    }
    cout << "No" << endl;
    
}

