#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>
#define ff first
#define ss second
#define endl '\n'
using namespace std;
const long long INF = (long long) 1e18;
const int mod = (int) 1e9+7;
const int MAXN = (int) 3e5+5;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
ll n;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);cout.tie(nullptr);

    #ifdef Local
        freopen("C:/Users/Admin/Desktop/Yazilim/C/IO/int.txt","r",stdin);
        freopen("C:/Users/Admin/Desktop/Yazilim/C/IO/out.txt","w",stdout);
    #endif

    ll b, c;

    cin>>b>>c;

    pll ara[4];

    if(b > 0){
        ara[0] = {-b - (c - 1) / 2,  -b};
        ara[1] = {b,  max(b, - (- b - c / 2)  - 1)};
        ara[2] = {b - c / 2, b};
        ara[3] = {-b, -(b - (c - 1) / 2)};
    }else if(b < 0){
        ara[0] = {b - c / 2, b};
        ara[1] = {-b, -b + (c - 1) / 2};
        ara[2] = {-b - (c - 1) / 2, -b};
        ara[3] = {b, - (-b - c / 2 + 1)};
    }else if(b == 0){
        ara[0] = {-c / 2, 0};
        ara[1] = {0, (c - 1) / 2};
        ara[2] = {0, 0};
        ara[3] = {0, 0};
    }
    sort(ara, ara + 4);

    ll cur = -3e18;

    ll ans = 0;

    for(pll u: ara){
        //cerr<<u.ff<<" "<<u.ss<<endl;
        if(u.ff > cur){
            ans += u.ss - u.ff + 1;
            cur = u.ss;
        }else{
            ans += max(0LL, u.ss - cur);
            cur = max(cur, u.ss);
        }
    }

    cout<<ans<<endl;



    #ifdef Local
        cout<<endl<<fixed<<setprecision(2)<<1000.0 * clock() / CLOCKS_PER_SEC<< " milliseconds ";
    #endif
}