#include<iostream>
#include<vector>
#include<cmath>
#include<unordered_set>
#include<algorithm>

using namespace std;

int main(){
	int n;cin>>n;
	vector<int> a(n),b(n),c(n),d(n);
	for(int i=0;i<n;i++)cin>>a[i]>>b[i];
	for(int i=0;i<n;i++)cin>>c[i]>>d[i];
	if(n==1){
		puts("Yes");
		return 0;
	}/*
	if(n==2){
		if((a[1]-a[0])*(a[1]-a[0])+(b[1]-b[0])*(b[1]-b[0])
				==(c[1]-c[0])*(c[1]-c[0])+(d[1]-d[0])*(d[1]-d[0]))
			puts("Yes");
		else puts("No");
		return 0;
	}*/
	vector<pair<long double,long double>> ab;
	int A=b[1]-b[0],B=-a[1]+a[0],C=a[1]*b[0]-a[0]*b[1];
	for(int i=0;i<n;i++){
		long double y=(A*a[i]+B*b[i]+C)/(long double)(sqrtl(A*A+B*B));
		long double x=(a[i]-a[0])*(a[i]-a[0])+(b[i]-b[0])*(b[i]-b[0])-y*y;
		x=abs(x);
		x=sqrt(x);
		ab.push_back(make_pair(x,y));
	}stable_sort(ab.begin(),ab.end());
	for(int i=0;i<n;i++){
		for(int j=0;j<n;j++){
			if(i==j)continue;
			A=d[i]-d[j],B=-c[i]+c[j],C=c[i]*d[j]-c[j]*d[i];
			vector<pair<long double,long double>> cd;
			for(int k=0;k<n;k++){
				long double y=(A*c[k]+B*d[k]+C)/(long double)(sqrtl(A*A+B*B));
				long double x=(c[k]-c[j])*(c[k]-c[j])+(d[k]-d[j])*(d[k]-d[j])-y*y;
				x=abs(x);
				x=sqrt(x);
				cd.push_back(make_pair(x,y));
			}int f=0;
			stable_sort(cd.begin(),cd.end());
			for(int k=0;k<n;k++)if(ab[k]!=cd[k])f=1;
			if(f==0){
				puts("Yes");
				return 0;
			}
		}
	}puts("No");
	return 0;
}

#include<iostream>
#include<string>
#include<vector>
#include<utility>
#include<algorithm>
#include<map>
#include<set>
#include<cstdlib>
#include<cmath>
#include<numeric>//fill
#include<iomanip>
#include<functional>//https://cpprefjp.github.io/reference/functional/function.html
#include<cstdlib>//https://cpprefjp.github.io/reference/cstdlib.html
#include<queue>
#include<deque>
#include<cassert>
#include<stack>
#include <iterator>     // std::back_inserter
//#include<atcoder/all>
using namespace std;
//using namespace atcoder;
const double PI = acos(-1);
using ll = long long;
using P = pair<ll,ll>;
#define rep(i,n)for(ll i=0;i<(n);i++)
#define repp(x,arr) for(auto& x:arr)
#define repp2(x,y,arr) for(auto& [x,y]:arr)
#define all(a) (a.begin()),(a.end())
const ll MOD = 1e9 + 7;
const ll inf = (ll)1e18+6;

// デフォルトは整数部も含めた桁数指定
//cout <<setprecision();
ll myPow(ll x, ll n, ll m) {
	if (n == 0)
		return 1;
	if (n % 2 == 0)
		return myPow(x * x % m, n / 2, m);
	else
		return x * myPow(x, n - 1, m) % m;
}
double dl[4] = { 0,0,0.1,0.1 };
double dr[4] = { 0,-0.1,0,-0.1 };
int main() {
	ios::sync_with_stdio(false);
	int N;
	cin >> N;
	vector<pair<double, double>>s(N), t(N);
	map<pair<double, double>,bool>m;
	rep(i, N) {
		cin >> t[i].first >> t[i].second;

	}
	rep(i, N) {
		cin >>s[i].first >> s[i].second;
		m[s[i]] = true;
	}

	if (N == 1) {
		cout << "Yes";
		return 0;
	}
	double a, b,a2,b2;
	a = s[0].first, b = s[0].second;
	a2 = s[1].first, b2 = s[1].second;
	double p1;
	p1 = atan((b2 - b) / (a2 - a));
	bool ans = false;
	//cout << "指標は" << a << " " << b << endl;
	rep(i, N) {
		double q, r,c, d;
		c = t[i].first, d = t[i].second;
		for (int j = 0; j < N; j++) {
			if(j==i)continue;
			double c2, d2,p,p2;
			c2 = t[j].first;
			d2 = t[j].second;
			c2 -= c;
			d2 -= d;
			p = p1-atan(d2 / c2);
			p2 = p + PI;
			{
				double A1, B1, x, y, x2, y2;
				A1 = t[j].first - c;
				B1 = t[j].second - d;
				x = A1 * cos(p) - B1 * sin(p);
				y = A1 * sin(p) + B1 * cos(p);
				x2 = A1 * cos(p2) - B1 * sin(p2);
				y2 = A1 * sin(p2) + B1 * cos(p2);
				x += a;
				y += b;
				x = round(x);
				y = round(y);
				x2 += a;
				y2 += b;
				x2 = round(x2);
				y2 = round(y2);
				if (x==a2&&y==b2) {
					p = p;
					
				}
				else if (x2 == a2 && y2 == b2) {
					p = p2;
				}
				else {
					continue;
				}

			}
			rep(k, N) {
				double A1, B1,x,y,x2,y2;
				A1 = t[k].first - c;
				B1 = t[k].second - d;
				x = A1 * cos(p) - B1 * sin(p);
				y = A1 * sin(p) + B1 * cos(p);
				//x2 = A1 * cos(p2) - B1 * sin(p2);
				y2 = A1 * sin(p2) + B1 * cos(p2);
				//cout << x << " " << y << endl;
				//cout << x2 << " " << y2 << endl;
				x += a;
				y+= b;
				x = round(x);
				y = round(y);
				if (m[{x,y}] == false) {
				//cout << "break"<<endl;
					break;
				}
				if (k == N - 1)ans = true;


			}
		}

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

