// ※※※ 解答不能 ※※※
// https://atcoder.jp/contests/abc207/editorial/2153
// C++(GCC 9.2.1)
#include <bits/stdc++.h>
using namespace std;
using vd = vector<double>;
#define repex(i, a, b, c) for(int i = a; i < b; i += c)
#define repx(i, a, b) repex(i, a, b, 1)
#define rep(i, n) repx(i, 0, n)
#define repr(i, a, b) for(int i = a; i >= b; i--)
int a0[101], b0[101], a1[101], b1[101], a2[101], b2[101], a3[101], b3[101], c[101], d[101];

int main(){
    int N;
    scanf("%d", &N);
    vd a(N), b(N), c(N), d(N);
    rep(_, 2){
        rep(i, N) scanf("%lf %lf", &a[i], &b[i]);
        int x = 0, y = 0;
        rep(i, N){
            x += a[i];
            y += b[i];
            a[i] *= N;
            b[i] *= N;
        }
        rep(i, N){
            a[i] -= x;
            b[i] -= y;
        }
        swap(a, c);
        swap(b, d);
    }
    rep(i, N){
        if(a[i] != 0 || b[i] != 0){
            swap(a[i], a[0]);
            swap(b[i], b[0]);
        }
    }
    string ans = "No";
    const double eps = 1e-6;
    rep(i, N){
        double angle = atan2(d[i], c[i]) - atan2(b[0], a[0]);
        bool ok = true;
        rep(j, N){
            double A = a[j] * cos(angle) - b[j] * sin(angle);
            double B = a[j] * sin(angle) + b[j] * cos(angle);
            bool ok2 = false;
            rep(k, N){
                if(abs(A - c[k]) <= eps && abs(B - d[k]) <= eps) ok2 = true;
            }
            ok &= ok2;
        }
        if(ok) ans = "Yes";
    }
    printf("%s\n", ans.c_str());
}
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll modn = 1000000007;
const double eps = 1e-3;
const double pi = acos(-1);
struct pii{
    double x,y;
    double len2() const{
        return x*x+y*y;
    }
    double arc(){
        return atan2(y,x);
    }
    pii rot(double th){
        return pii{cos(th)*x-sin(th)*y,sin(th)*x+cos(th)*y};
    }
};

bool comp(const pii& a,const pii &b){
    return fabs(a.len2()-b.len2())<1e-6;
}
pii s[200],t[200];
pii temp_t[200];
int n;
pii operator -(const pii& a,const pii &b){
    return pii{a.x-b.x,a.y-b.y};
}

bool check(int a,int b){
    pii dis = t[a];
    for(int i=0;i<n;i++)temp_t[i]=t[i]-dis;
    double th = -(temp_t[b]).arc();
    for(int i=0;i<n;i++)temp_t[i]=temp_t[i].rot(th);
    for(int i=0;i<n;i++){
        int flag=0;
        for(int j=0;j<n;j++){
            if((temp_t[i]-s[j]).len2()<eps){
                flag=1;
                break;
            }
        }
        if(flag==0)return 0;

    }
    return 1;
    //temp_t[b]
}

int main()
{
    cin>>n;
    if(n==1){
        cout<<"Yes"<<endl;
        return 0;
    }
    for(int i=0;i<n;i++)cin>>s[i].x>>s[i].y;

    for(int i=1;i<n;i++){
        s[i]=s[i]-s[0];
    }
    s[0]=s[0]-s[0];
    double th = -s[1].arc();
    for(int i=1;i<n;i++){
        s[i]=s[i].rot(th);
    }//for(int i=0;i<n;i++)cout<<s[i].x<<" "<<s[i].y<<endl;
    for(int i=0;i<n;i++)cin>>t[i].x>>t[i].y;
    ll ans = 0;
    for(int i=0;i<n;i++){

        for(int j=0;j<n;j++){
            if(j==i)continue;
            if(!comp(t[j]-t[i],s[1]))continue;
            if(check(i,j)){ans=1;}
            if(ans)break;
        }
        if(ans)break;
    }
    if(ans)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
    return 0;
}
