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

const int N = 105;

int n;
typedef pair<int, int> pint;
pint a[N], b[N], c[N];


int product(pint a, pint b) {
	return a.first * b.second - a.second * b.first;
}

pint diff(pint b, pint a) {
	return {b.first - a.first, b.second - a.second};
}

int sqr(int x) {
	return x * x;
}

int dist(pint a, pint b) {
	return sqr(a.first - b.first) + sqr(b.second - a.second);
}

void _sort(pint a[]) {
	pint diff_root = diff(a[2], a[1]);

	sort(a + 3, a + n + 1, [&a, diff_root](const pint &x, const pint &y) {
		pint diff_x = diff(x, a[1]);
		pint diff_y = diff(y, a[1]);
		int product_x = product(diff_x, diff_root);
		int product_y = product(diff_y, diff_root);
		int dist_x = dist(x, a[1]);
		int dist_y = dist(y, a[1]);

		if (product_x != product_y) {
			return product_x < product_y;
		} else {
			return dist_x < dist_y;
		}
	});
}

bool check() {
	for (int i = 2; i <= n; ++ i) {
		if (dist(a[i], a[1]) != dist(c[i], c[1])) {
			return false;
		}
	}

	pint v_a = diff(a[2], a[1]);
	pint v_c = diff(c[2], c[1]);

	for (int i = 3; i <= n; ++ i) {
		pint x_a = diff(a[i], a[1]);
		pint x_c = diff(c[i], c[1]);
		if (product(x_a, v_a) != product(x_c, v_c)) {
			return false;
		}
	}

	return true;
}

int main() {
	cin >> n;
	for (int i = 1; i <= n; ++ i) {
		cin >> a[i].first >> a[i].second;
	}
	for (int i = 1; i <= n; ++ i) {
		cin >> b[i].first >> b[i].second;
	}

	if (n == 1) {
		cout << "Yes\n";
		return 0;
	}

	_sort(a);


	for (int root = 1; root <= n; ++ root) {
		for (int rear = 1; rear <= n; ++ rear) {
			if (rear == root) {
				continue;
			}

			c[1] = b[root];
			c[2] = b[rear];
			int index = 3;
			for (int i = 1; i <= n; ++ i) {
				if (i != rear && i != root) {
					c[index ++] = b[i];
				}
			}

			_sort(c);
			if (check()) {
				cout << "Yes";
				return 0;
			}
		}
	}

	cout << "No";
}
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
template<class T> using vc = vector<T>;
template<class T> using vvc = vector<vector<T>>;

#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define repr(i, n) for (ll i = (n)-1; i >= 0; i--)
#define repe(i, l, r) for (ll i = (l); i < (r); i++)
#define reper(i, l, r) for (ll i = (r)-1; i >= (l); i--)
#define repa(i,n) for (auto& i: n)

template<class T1, class T2> inline bool chmax(T1 &a, const T2 &b) {if (a<b) { a=b; return 1;} return 0;}
template<class T1, class T2> inline bool chmin(T1 &a, const T2 &b) {if (b<a) { a=b; return 1;} return 0;}
struct init{init(){cin.tie(0);ios::sync_with_stdio(false);cout<<fixed<<setprecision(15);cerr<<fixed<<setprecision(15);}}init_;

#ifdef DEBUG
template <class T> void verr(const set<T> &st) { repa(a, st) cerr << a << " "; cerr << endl; }
template <class S, class T> void verr(const map<S, T> &mp) { repa(a, mp) cerr << "{" << a.first << ", " << a.second << "} "; cerr << endl; }
template <class S, class T, class N> void verr(const vector<pair<S,T>>& a, const N& n) { rep(i, n) cerr << "{" << a[i].first << ", " << a[i].second << "} "; cerr << endl; }
template <class T, class N> void verr(const vector<T>& a, const N& n) { rep(i, n) cerr << a[i] << " "; cerr << endl; }
ll dbgt = 1; void err() { cerr << "passed " << dbgt++ << endl; }
template<class H, class... T> void err(H&& h,T&&... t){ cerr<< h << (sizeof...(t)?" ":"\n") << flush; if(sizeof...(t)>0) err(forward<T>(t)...); }
#endif

const ll INF = 4e18;
const ld EPS = 1e-6;
const ld PI = acos(-1.0L);
const ll MOD = 1e9 + 7;
// const ll MOD = 998244353;
//--------------------------------------------------------------------------------//

int main() {
    ll N;
    cin >> N;
    vc<complex<ld>> S(N), T(N);
    rep(i, N) {
        ld a, b;
        cin >> a >> b;
        S[i] = {a, b};
    }
    rep(i, N) {
        ld a, b;
        cin >> a >> b;
        T[i] = {a, b};
    }

    complex<ld> sc(0, 0), tc(0, 0);
    rep(i, N) sc += S[i], tc += T[i];
    sc /= N, tc /= N;

    rep(i, N){
        S[i] -= sc;
        T[i] -= tc;
    }
    rep(i, N) rep(k, 2){
        vc<complex<ld>> ss(N), tt(N);
        rep(si, N) ss[si] = S[si] * polar(1.0L, -arg(S[k]));
        rep(ti, N) tt[ti] = T[ti] * polar(1.0L, -arg(T[i]));

        bool ok = true;
        rep(si, N) {
            bool isok = false;
            rep(ti, N){
                if (abs(ss[si] - tt[ti]) < EPS) isok = true;
            }
            if(!isok){
                ok = false;
                break;
            }
        }
        if(ok){
            cout << "Yes" << endl;
            return 0;
        }
    }

    cout << "No" << endl;
}