/*
Over Again
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define sz(v)   ((int)(v).size())
#define  all(v)    ((v).begin()),((v).end())
#define  allr(v)    ((v).rbegin()),((v).rend())
#define   pb         push_back
#define   mp         make_pair
#define    clr(v,d)      memset( v, d ,sizeof(v))
#define    lcm(a,b)                ((a*b)/(__gcd(a,b)))
#define     PI                       acos(-1)
#define   vec(a,b)       ((b)-(a))
#define   length(a)      hypot( (a.imag()),(a.real()) )
#define   normalize(a)      (a)/(length(a))
#define     point                    complex<double>
#define    dp(a,b)          (((conj(a))*(b)).real())
#define     same(p1,p2)               ( dp(  vec(p1,p2),vec(p1,p2)) < eps )
#define    rotate0( a,ang)    ((a)*exp( point(0,ang) ))
#define    rotateA(about,p,ang)   (rotate0(vec(about,p),ang)+about)
typedef  long long     ll ;
typedef  unsigned long long ull;
const double eps= (1e-8);
const double EPS = 1e-6;
using namespace std;
using namespace __gnu_pbds;
int dcmp(double a,double b){   return fabs(a-b)<=eps ? 0: (a>b)? 1:-1  ;}
int getBit(ll num, int idx) {return ((num >> idx) & 1ll) == 1;}
int setBit1(int num, int idx) {return num | (1<<idx);}
ll setBit0(ll num, int idx) {return num & ~(1ll<<idx);}
ll flipBit(ll num, int idx) {return num ^ (1ll<<idx);}
void GO(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);}
int countNumBit1(int mask) {int ret=0; while (mask) 	{mask &= (mask-1);++ret;	}return ret;}
const ll N=2000+5,mod=1000000007,sh=201,inf=2000000000;
typedef tree<
pair<ll,ll> ,
null_type,
less<pair<ll,ll> >,
rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
double sx[N],sy[N],tx[N],ty[N];

double get_angle(int x,int y){

 return atan2(y,x);
}
int get_dist(int x,int y){

 return x*x+y*y;
}
double torad(double ang){

 return (ang*PI/180.0);
}
int main(){
     GO();

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

        int n;
        cin>>n;
        vector< pair<double,pair<int,int> > > v2,v1;
        int sumx=0,sumy=0;
        for(int i=0;i<n;i++){
            cin>>sx[i]>>sy[i];

            sumx+=sx[i];
            sumy+=sy[i];
            sx[i]*=n;
            sy[i]*=n;
        }

        for(int i=0;i<n;i++){
            sx[i]-=sumx;
            sy[i]-=sumy;
        }
        sumx=0;
        sumy=0;
        for(int i=0;i<n;i++){
            cin>>tx[i]>>ty[i];
            sumx+=tx[i];
            sumy+=ty[i];
            tx[i]*=n;
            ty[i]*=n;
        }

        for(int i=0;i<n;i++){
            tx[i]-=sumx;
            ty[i]-=sumy;
        }

        for(int i=0;i<n;i++){
            if(sx[i]!=0||sy[i]!=0){
                swap(sx[i],sx[0]);
                swap(sy[i],sy[0]);
            }
        }


        bool ans=0;
        for(int i=0;i<n;i++){

            double d1= get_angle(sx[0],sy[0]);
            double d2= get_angle(tx[i],ty[i]);
            double dd= d2-d1;
            map< pair<double,double> ,int> mb;
            bool fok=1;
            for(int j=0;j<n;j++){
                double tsx= sx[j]*cos(dd)-sy[j]*sin(dd);
                double tsy= sx[j]*sin(dd)+sy[j]*cos(dd);
                bool ok=0;
                for(int j=0;j<n&&ok==0;j++){
                    if(dcmp(tx[j],tsx)==0&&dcmp(ty[j],tsy)==0){
                        ok=1;
                    }
                }
                if(ok==0){
                    fok=0;
                    break;
                }
               // if(i==2) cout<<tsx<<" "<<tsy<<" "<<mb[mp(tsx,tsy)]<<endl;
            }


            if(fok){
                ans=1;
                break;
            }
        }

        if(ans){
            cout<<"Yes\n";
        }
        else{
            cout<<"No\n";
        }


     }
}








#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();
}