/****Bismillahir rahmanir rahim****/

#include<bits/stdc++.h>

using namespace std;

typedef long long            ll;
typedef long double          ld;
typedef vector<int>          vi;
typedef vector<long long>    vl;
typedef vector<double>       vd;

#define All(a) a.begin(),a.end()

template <typename T>
void get_vector(T &a)
{
    for(auto &e: a) cin >> e;
}

template <typename T>
void put_vector(T a)
{
    for(auto e :a)cout << e << " ";
    cout << endl;
}


int main()
{
    int n;
    cin >> n;
    vd a(n),b(n),c(n),d(n);
    int x = 0,y = 0;
    for(int i = 0 ;i <n; i++)
    {
        cin >> a[i]>>b[i];
        x += a[i];y += b[i];
        a[i]*=n;b[i]*=n;
    } 
    for(int i = 0; i<n ; i++)
    {
        a[i] -= x; b[i]-= y;
    }x = 0, y = 0;
    for(int i = 0 ;i <n; i++)
    {
        cin >> c[i]>>d[i];
        x += c[i];y += d[i];
        c[i]*=n;d[i]*=n;
    } 
    for(int i = 0; i<n ; i++)
    {
        c[i] -= x; d[i]-= y;
    }
    double X,Y;
    for(int i=0; i<n; i++){
        if(a[i]!=0 || b[i]!=0){
            swap(a[i],a[0]);
            swap(b[i],b[0]);
        }
    }
    X = a[0];
    Y = b[0];
   // put_vector(a); put_vector(b);put_vector(c);put_vector(d);
    //cout << "x = " << X << " Y = " << Y << endl;
    const double diff = 1e-6;
    string ans = "No";
    for(int i = 0; i <n;i++)
    {
        double angle = atan2(d[i],c[i]) - atan2(Y,X);
        bool ok = true;
        for(int j = 0; j<n; j++)
        {
            double cx = a[j]*cos(angle) - b[j]*sin(angle);
            double cy = a[j]*sin(angle) + b[j]*cos(angle);
            bool ok2 = false;
            for(int k = 0; k<n; k++)
            {
                if(abs(cx-c[k])<=diff&&abs(cy-d[k])<=diff)ok2 = true;
            }
            ok &= ok2;
        }

        if(ok)ans = "Yes";
    }
    cout << ans << endl;
    return 0;
}

#pragma GCC optimize("Ofast")
 
#include <bits/stdc++.h>
 
using namespace std;
 
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define Erep(i,n) for(int i = 0; i <= (n); ++i)
#define repS(i,s,n) for(int i = s; i < (n); ++i)
#define ErepS(i,s,n) for(int i = s; i <= (n); ++i)
#define Sort(a) sort(a.begin(), a.end())
#define RSort(a) sort(a.rbegin(), a.rend())
#define Output(a) printf("%lld %s", a, "\n")
 
typedef long long int ll;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vector<string> vst;
typedef vector<double> vd;

const ll INF = 0x1fffffffffffffff;
const ll MOD = 1000000007;
const double PI = acos(-1);

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
 
ll n;
vd a, b, c, d;

void input(){
    cin >> n;
    a = vd(n);
    b = vd(n);
    c = vd(n);
    d = vd(n);
    rep(i, n) cin >> a[i] >> b[i];
    rep(i, n) cin >> c[i] >> d[i];
}

void solve(){
    string ans = "No";
    vd x(n), y(n);
    for(int k = 0; k < 360; k++){
        rep(i, n){
            double tx = a[i], ty = b[i];
            x[i] = tx * cos((k * PI ) / 180) - ty * sin((k * PI ) / 180);
            y[i] = tx * sin((k * PI ) / 180) + ty * cos((k * PI ) / 180);
        }
        double ave_s_x = 0, ave_s_y = 0, ave_t_x = 0, ave_t_y = 0;
        rep(i, n){
            ave_s_x += x[i];
            ave_s_y += y[i];
            ave_t_x += c[i];
            ave_t_y += d[i];
        }
        double diff_x = (ave_t_x - ave_s_x) / n;
        double diff_y = (ave_t_y - ave_s_y) / n;
        ll check = 1;
        rep(i, n){
            ll count = 0;
            rep(j, n){
                double ex = x[i] + diff_x, ey = y[i] + diff_y;
                //if(k == 90)
                //cout << ex << " " << c[j] << " " << ey << " " << d[j] << "\n";
                if(abs(ex - c[j]) <= (double) 0.05 && abs(ey - d[j]) <= (double) 0.05){
                  //cout << k << endl;
                  //cout << x[i] << " " << c[j] << " " << y[i] << " " << d[j] << "\n";
                    count++;
                }
            }
            if(count == 0){
                check = 0;
            }
        }
        if(check){
            ans = "Yes";
            break;
        }
    }
    cout << ans << endl;
}
 
int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    
    input();
    solve();
}