#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
	cin>>n;
    vector<double> a(n),b(n),c(n),d(n);
    for(int _=0; _<2; _++){
        for(int i=0;i<n;i++) cin>>a[i]>>b[i];
        int x=0,y=0;
        for(int i=0;i<n;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;
        }
        swap(a,c);
        swap(b,d);
    }
    for(int i=0;i<n;i++){
        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;
    for(int i=0;i<n;i++){
        double angle=atan2(d[i],c[i])-atan2(b[0],a[0]);
        bool flag=true;
        for(int j=0;j<n;j++){
            double A=a[j]*cos(angle)-b[j]*sin(angle);
            double B=a[j]*sin(angle)+b[j]*cos(angle);
            bool flag2=false;
            for(int k=0;k<n;k++){
                if(abs(A-c[k])<=eps&&abs(B-d[k])<=eps) flag2=true;
            }
            flag&=flag2;
        }
        if(flag) ans="Yes";
    }
    cout<<ans;
}
#include<bits/stdc++.h>
#define Woody
#define int long long
#define rep(n) for(int i=0;i<n;i++)
#define mp make_pair
#define eb emplace_back
#define F first
#define S second
#ifdef Woody
#define quick ios::sync_with_stdio(0);cin.tie(0);
#else
#define quick
#endif
#define INF INT64_MAX
#define PI 3.14159265
using namespace std;
const double eps=1e-3;
typedef pair<double,double> p;
bool ok(int n,vector<p> v1,vector<p> v2){
//	cout<<"OK\n";

	sort(v2.begin(),v2.end());
/*	rep(n){
		printf("%.5lf %.5lf\n",v1[i].F,v1[i].S);
	}//cout<<"\n";
	rep(n){
		printf("%.5lf %.5lf\n",v2[i].F,v2[i].S);
	}cout<<"\n";*/
	double disx=v1[0].F-v2[0].F;
	double disy=v1[0].S-v2[0].S;
	for(int i=1;i<n;i++){
		double dx=v1[i].F-v2[i].F;
		double dy=v1[i].S-v2[i].S;
		if(abs(disx-dx)>eps||abs(disy-dy)>eps) return false;
	}


	return true;
}
bool solve(){
	int n;
	cin>>n;
	vector<p> v1(n);
	vector<p> v2(n);
	rep(n){
		cin>>v2[i].F>>v2[i].S;
	}
	rep(n){
		cin>>v1[i].F>>v1[i].S;
	}
	sort(v1.begin(),v1.end());
	vector<p> v3(n);
	for(double d=0;d<=360;d+=0.0005){
		double s=sin(d*PI/180.0);
		double c=cos(d*PI/180.0);
		rep(n){
			double x=v2[i].F;
			double y=v2[i].S;
			v3[i].F=x*c+y*(-1)*s;
			v3[i].S=x*s+y*c;
		}
		if(ok(n,v1,v3)) return true;
	}
	return false;
}
signed main(){
	quick
	bool f=solve();
	if(f) cout<<"Yes\n";
	else cout<<"No\n";

}