#include <bits/stdc++.h>
using namespace std;

const string YES = "Yes";
const string NO = "No";

using ll = long long;


int main(){
    int N;cin >> N;
    vector<pair<int, int>> v1, v2;
    for(int i = 0;i < N;i++){
        int A, B;cin >> A >> B;
        v1.push_back(make_pair(A, B));
    }
    for(int j = 0;j < N;j++){
        int A, B;cin >> A >> B;
        v2.push_back(make_pair(A, B));
    }
    sort(v1.begin(), v1.end());
    static const double pi = 3.141592653589793;
    for(long double theta = 0;theta < 360;theta += 0.01){
        vector<pair<long double, long double>> p;
        for(int i = 0;i < N;i++){
            p.push_back(make_pair(cos(pi * theta / 180) * v2[i].first + -sin(pi * theta / 180) * v2[i].second, sin(pi * theta / 180) * v2[i].first + cos(pi * theta / 180) * v2[i].second));
        }
        sort(p.begin(), p.end());

        vector<long double> X_diff, Y_diff;
        for(int i = 0;i < N;i++){
            X_diff.push_back(p[i].first - v1[i].first);
            Y_diff.push_back(p[i].second - v1[i].second);
        }
        if(*max_element(X_diff.begin(), X_diff.end()) - *min_element(X_diff.begin(), X_diff.end()) <= 0.01 && *max_element(Y_diff.begin(), Y_diff.end()) - *min_element(Y_diff.begin(), Y_diff.end()) <= 0.01){
            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;
using vl = vector<ll>;
template<class T> using vc = vector<T>;
template<class T> using vvc = vector<vector<T>>;

#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define repr(i, n) for (ll i = (n)-1; i >= 0; i--)
#define repe(i, l, r) for (ll i = (l); i < (r); i++)
#define reper(i, l, r) for (ll i = (r)-1; i >= (l); i--)
#define repa(i,n) for (auto& i: n)

template<class T1, class T2> inline bool chmax(T1 &a, const T2 &b) {if (a<b) { a=b; return 1;} return 0;}
template<class T1, class T2> inline bool chmin(T1 &a, const T2 &b) {if (b<a) { a=b; return 1;} return 0;}
struct init{init(){cin.tie(0);ios::sync_with_stdio(false);cout<<fixed<<setprecision(15);cerr<<fixed<<setprecision(15);}}init_;

#ifdef DEBUG
template <class T> void verr(const set<T> &st) { repa(a, st) cerr << a << " "; cerr << endl; }
template <class S, class T> void verr(const map<S, T> &mp) { repa(a, mp) cerr << "{" << a.first << ", " << a.second << "} "; cerr << endl; }
template <class S, class T, class N> void verr(const vector<pair<S,T>>& a, const N& n) { rep(i, n) cerr << "{" << a[i].first << ", " << a[i].second << "} "; cerr << endl; }
template <class T, class N> void verr(const vector<T>& a, const N& n) { rep(i, n) cerr << a[i] << " "; cerr << endl; }
ll dbgt = 1; void err() { cerr << "passed " << dbgt++ << endl; }
template<class H, class... T> void err(H&& h,T&&... t){ cerr<< h << (sizeof...(t)?" ":"\n") << flush; if(sizeof...(t)>0) err(forward<T>(t)...); }
#endif

const ll INF = 4e18;
const ld EPS = 1e-6;
const ld PI = acos(-1.0L);
const ll MOD = 1e9 + 7;
// const ll MOD = 998244353;
//--------------------------------------------------------------------------------//

int main() {
    ll N;
    cin >> N;
    vc<complex<ld>> S(N), T(N);
    rep(i, N) {
        ld a, b;
        cin >> a >> b;
        S[i] = {a, b};
    }
    rep(i, N) {
        ld a, b;
        cin >> a >> b;
        T[i] = {a, b};
    }

    complex<ld> sc(0, 0), tc(0, 0);
    rep(i, N) sc += S[i], tc += T[i];
    sc /= N, tc /= N;

    rep(i, N){
        S[i] -= sc;
        T[i] -= tc;
    }
    rep(i, N) rep(k, 2){
        vc<complex<ld>> ss(N), tt(N);
        rep(si, N) ss[si] = S[si] * polar(1.0L, -arg(S[k]));
        rep(ti, N) tt[ti] = T[ti] * polar(1.0L, -arg(T[i]));

        bool ok = true;
        rep(si, N) {
            bool isok = false;
            rep(ti, N){
                if (abs(ss[si] - tt[ti]) < EPS) isok = true;
            }
            if(!isok){
                ok = false;
                break;
            }
        }
        if(ok){
            cout << "Yes" << endl;
            return 0;
        }
    }

    cout << "No" << endl;
}