#include <bits/stdc++.h>
using namespace std;

int main() {
    int N; cin >> N;
    vector<complex<double>> st(N), en(N);
    for(int i = 0; i < N; i++) {
        int a, b; cin >> a >> b;
        st[i] = {a * 1.0 , b * 1.0};
    }
    set<pair<double, double>> in;
    for(int i = 0; i < N; i++) {
        int c, d; cin >> c >> d;
        en[i] = {c * 1.0, d * 1.0};
        in.insert({c, d});
    }
    
    if(N == 1) {
        cout << "Yes" << "\n";
        return 0;
    }
    for(int i = 0; i < N; i++) {
        for(int j = 0; j < N; j++) {
            if(j == i) continue;
            complex<double> rot = (en[i] - en[j]) / (st[0] - st[1]);
            complex<double> trans = en[i] - st[0] * rot;
            double norm = real(rot) * real(rot) + imag(rot) * imag(rot);
            if(abs(norm - 1.0) > 0.00001) {
                continue;
            }
            bool work = true;
            for(int k = 0; k < N; k++) {
                complex<double> tmp = st[k] * rot + trans;
                bool close = false;
                for(int look = 0; look < N; look++) {
                    if(abs(real(tmp) - real(en[look])) < 0.00001 && abs(imag(tmp) - imag(en[look])) < 0.00001)
                        close = true;
                }
                if(!close) {
                    work = false;
                    break;
                }
            }
            if(work) {
                //cout << real(rot) << " " << imag(rot) << "\n";
                //cout << real(trans) << " " << imag(trans) << "\n";
                cout << "Yes" << "\n";
                return 0;
            }
        }
    }
    cout << "No" << "\n";
}

#include <bits/stdc++.h>
using namespace std;
#define reps(i, a, n) for (int i = (a); i < (n); ++i)
#define rep(i, n) reps(i, 0, n)
#define deps(i, a, n) for (int i = (a); i >= (n); --i)
#define dep(i, n) deps(i, n, 0)
#define inf LLONG_MAX
#define int long long
#define mod 998244353
#define pi M_PI

struct _xy{
	double x;
	double y;
};

int n;
struct _xy s[105];
struct _xy t[105];
struct _xy u[105];

void func(int ang){
	rep (i, n){
		u[i].x = s[i].x*cos(ang*pi/180.0) - s[i].y*sin(ang*pi/180.0);
		u[i].y = s[i].x*sin(ang*pi/180.0) + s[i].y*cos(ang*pi/180.0);
	}

	int cnt = 0;
	rep (i, n){
		rep (j, n){
			if ((u[j].x-0.1 <= t[i].x && t[i].x <= u[j].x+0.1) &&
				(u[j].y-0.1 <= t[i].y && t[i].y <= u[j].y+0.1)
				) {u[j] = {-200, -200}; cnt++; break;}
		}
	}
	if (cnt == n) {cout << "Yes" << endl; exit(EXIT_SUCCESS);}
}

signed main(void){
	cin >> n;
	rep (i, n) cin >> s[i].x >> s[i].y;
	rep (i, n) cin >> t[i].x >> t[i].y;
	struct _xy so = {0.0, 0.0};
	struct _xy to = {0.0, 0.0};
	rep (i, n){
		so.x += s[i].x; so.y += s[i].y;
		to.x += t[i].x; to.y += t[i].y;
	}
	so.x /= n; so.y /= n;
	to.x /= n; to.y /= n;
	rep (i, n){
		s[i].x -= so.x; s[i].y -= so.y;
		t[i].x -= to.x; t[i].y -= to.y;
	}
	rep (i, 360){
		func(i);
	}
	cout << "No" << endl;
}
