#include <algorithm>
#include <iomanip>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <deque>
#include <functional>
#include <iostream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <sstream>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <numeric>
#include <vector>
using namespace std;
#if __has_include(<atcoder/all>)
#include <atcoder/all>
using namespace atcoder;
#endif
#define GET_MACRO(_1, _2, _3, NAME, ...) NAME
#define _rep(i, n) _rep2(i, 0, n)
#define _rep2(i, a, b) for(int i = (int)(a); i < (int)(b); i++)
#define rep(...) GET_MACRO(__VA_ARGS__, _rep2, _rep)(__VA_ARGS__)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
using i64 = long long;
template<class T, class U>
bool chmin(T& a, const U& b) { return (b < a) ? (a = b, true) : false; }
template<class T, class U>
bool chmax(T& a, const U& b) { return (b > a) ? (a = b, true) : false; }

template<typename T>istream& operator>>(istream&i,vector<T>&v){rep(j,v.size())i>>v[j];return i;}
template<typename T>string join(vector<T>&v){stringstream s;rep(i,v.size())s<<' '<<v[i];return s.str().substr(1);}
template<typename T>ostream& operator<<(ostream&o,vector<T>&v){if(v.size())o<<join(v);return o;}
template<typename T>string join(vector<vector<T>>&vv){string s="\n";rep(i,vv.size())s+=join(vv[i])+"\n";return s;}
template<typename T>ostream& operator<<(ostream&o,vector<vector<T>>&vv){if(vv.size())o<<join(vv);return o;}
template<class T> using pq = priority_queue<T, vector<T>, greater<T>>;

struct C
{
    int x, y;
    C(int x = 0, int y = 0) : x(x), y(y) {}
    C operator*(const C& a) const {
        return C(x * a.x - y * a.y, x * a.y + y * a.x);
    }
    C operator-(const C& a) const {
        return C(x - a.x, y - a.y);
    }
    bool operator<(const C& a) const {
        if (x == a.x) return y < a.y;
        return x < a.x;
    };
    bool operator==(const C& a) const {
        return x == a.x && y == a.y;
    };
    int norm() const { return x*x + y*y;}
};


int main()
{
    int n;
    cin >> n;
    vector<C> a(n), b(n);
    rep(i, n) {
        int x,y;
        cin >> x >> y;
        a[i] = C(x, y);
    }
    rep(i, n) {
        int x, y;
        cin >> x >> y;
        b[i] = C(x, y);
    }

    if(n == 1) {
        cout << "Yes" << endl;
        return 0;
    }

    rep(i, n) {
        rep(j, n) {
            // a[0] -> b[i]
            // a[1] -> b[j]
            if(i == j) continue;
            if((a[1] - a[0]).norm() != (b[j] - b[i]).norm()) continue; // 長さが違えばアウト

            auto f = [&](vector<C> p, C o, C r) {
                rep(i, n) p[i] = p[i] - o; // 平衡移動
                rep(i, n) p[i] = p[i] * r; // 回転
                sort(p.begin(), p.end());
                return p;
            };
            vector<C> na = f(a, a[0], b[j] - b[i]); // a[0] を原点にして，回転
            vector<C> nb = f(b, b[i], a[1] - a[0]); // a[0] を原点にして，回転
            if(na == nb) {
                cout << "Yes" << endl;
                return 0;
            }
        }
    }

    cout << "No" << endl;

    return 0;
}
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define sz(x) int(x.size())
const int mod = 1e9 + 7;
const int inf = 2e9 + 5;
const ll linf = 9e18 + 5;
const ll ll0 = 0 * 1ll;


int n;
const int N = 1e2 + 5;
ll arr[N][2];
ll equi[2];

ll arr2[N][2];
ll equi2[2];

pair<ll, ll> iden[N];
pair<ll, ll> examp[N];

ll cross (int i) {
    pair<ll, ll> v1 = mp(arr[0][0] - equi[0], arr[0][1] - equi[1]);
    pair<ll, ll> v2 = mp(arr[i][0] - equi[0], arr[i][1] - equi[1]);

    return v1.fi * v2.se - v1.se * v2.fi;
}
ll cross2 (int i, int c) {
    pair<ll, ll> v1 = mp(arr2[c][0] - equi2[0], arr2[c][1] - equi2[1]);
    pair<ll, ll> v2 = mp(arr2[i][0] - equi2[0], arr2[i][1] - equi2[1]);

    return v1.fi * v2.se - v1.se * v2.fi;
}

ll dist (int i) {
    ll ans = (equi[0] - arr[i][0]) * (equi[0] - arr[i][0]);
    ans += (equi[1] - arr[i][1]) * (equi[1] - arr[i][1]);

    return ans;
}

ll dist2 (int i) {
    ll ans = (equi2[0] - arr2[i][0]) * (equi2[0] - arr2[i][0]);
    ans += (equi2[1] - arr2[i][1]) * (equi2[1] - arr2[i][1]);

    return ans;
}

void init () {
}

void input () {
    cin >> n;

    for (int i = 0; i < n; i++) {
        cin >> arr[i][0] >> arr[i][1];

        equi[0] += arr[i][0];
        equi[1] += arr[i][1];

        arr[i][0] *= n;
        arr[i][1] *= n;
    }
    for (int i = 0; i < n; i++) {
        cin >> arr2[i][0] >> arr2[i][1];

        equi2[0] += arr2[i][0];
        equi2[1] += arr2[i][1];

        arr2[i][0] *= n;
        arr2[i][1] *= n;
    }

    for (int i = 0; i < n; i++) {
        ll d = dist(i);

        iden[i] = mp(cross(i), d);
    }

    sort(iden, iden + n);
}

void create_with(int ind) {
    for (int i = ind; i < ind + n; i++) {
        int j = i % n;


        ll d = dist2(j);

        examp[j] = mp(cross2(j, ind), d);
    }

    sort(examp, examp + n);
}

void solve() {
    for (int i = 0; i < n; i++) {
        create_with(i);

        bool good = true;

        for (int i = 0; i < n; i++) {
            if (examp[i] != iden[i]) {
                good = false;
                break;
            }
        }

        if (good) {
            cout << "Yes";
            return;
        }
    }

    cout << "No";
}

void output() {
}

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    int number_of_testcases = 1;
    //cin >> number_of_testcases;
    while (number_of_testcases--) {
        init();

        input();

        solve();

        output();
    }

    return 0;
}
