// ＵＴＦ−８

#include<bits/stdc++.h>

using namespace std;
using ll = long long int;
using lc = complex<double>;
template <class T>
bool complex_comparator(const complex<T> &a, const complex<T> &b) {
 return real(a) == real(b) ? imag(a) < imag(b) : real(a) < real(b);
}

/* #include<atcoder/all> */
/* using namespace atcoder; */

template<class T>bool chmax(T &a, const T &b) { return (a<b ? (a=b,1) : 0); }
template<class T>bool chmin(T &a, const T &b) { return (a>b ? (a=b,1) : 0); }

int main(void) {
    constexpr ll MOD = 0 ? 1e9+7 : 998244353;
    const double PI = acos(-1);
    constexpr double eps = 1e-5;
    cout << fixed << setprecision(32);
    cin.tie(0); ios::sync_with_stdio(false);

    if(1) {
        ll n;
        cin >> n;
        vector<lc> s(n), t(n);

        lc gs = 0, gt = 0;
        for(ll i=0; i<n; i++) {
            double x, y;
            cin >> x >> y;
            s[i] = lc(n*x, n*y);
            gs += s[i];
        }
        for(ll i=0; i<n; i++) {
            double x, y;
            cin >> x >> y;
            t[i] = lc(n*x, n*y);
            gt += t[i];
        }
        gs /= n;
        gt /= n;
        for(auto &v: s) v -= gs;
        for(auto &v: t) v -= gt;

        {
            ll i;
            for(i=0; i<n; i++) {
                if(s[i] != 0.0) break;
            }
            if(i == n) {
                for(i=0; i<n; i++) {
                    if(t[i] != 0.0) break;
                }
                cout << (i == n ? "Yes" : "No") << endl;
                return 0;
            }

            lc x = s[i] / abs(s[i]);
            for(ll j=0; j<n; j++)
                s[j] /= x;
        }
        sort(begin(s), end(s), complex_comparator<double>);

        for(ll i=0; i<n; i++) {
            if(t[i] == 0.0) continue;

            vector<lc> tt(n);
            for(ll j=0; j<n; j++)
                tt[j] = t[j] / (t[i] / abs(t[i]));

            sort(begin(tt), end(tt), complex_comparator<double>);

            bool ok = true;
            for(ll j=0; j<n; j++) {
                ok &= norm(tt[j] - s[j]) < eps;
            }
            if(ok) {
                cout << "Yes" << endl;
                return 0;
            }
        }
        cout << "No" << endl;

    }
    return 0;
}
#include <bits/stdc++.h>

#define fi first
#define se second
#define DB double
#define U unsigned
#define LL long long
#define LD long double
#define pb emplace_back
#define MP std::make_pair
#define SZ(x) ((int)x.size())
#define all(x) x.begin(),x.end()
#define CLR(i,a) memset(i,a,sizeof(i))
#define FOR(i,a,b) for(int i = a;i <= b;++i)
#define ROF(i,a,b) for(int i = a;i >= b;--i)
#define DEBUG(x) std::cerr << #x << '=' << x << std::endl

const int MAXN = 100 + 5;
const DB EPS = 1e-9;

inline int sgn(DB x){
	if(std::fabs(x) <= EPS) return 0;
	return x > 0 ? 1 : -1;
}

struct P{
	DB x,y;
	P(DB x=0,DB y=0) : x(x),y(y) {}
	P operator + (const P &t) const {return P(x+t.x,y+t.y);}
	P operator - (const P &t) const {return P(x-t.x,y-t.y);}
	P operator / (const DB &t) const {return P(x/t,y/t);}
	DB dot(const P &t){return x*t.x+y*t.y;}
	DB det(const P &t){return x*t.y-y*t.x;}
	DB len2(){return x*x+y*y;}
	DB len(){return std::sqrt(len2());}

	inline bool operator < (const P &t) const {
		if(sgn(x-t.x)) return sgn(x-t.x) < 0;
		return sgn(y-t.y) < 0;
	}

	inline bool operator == (const P &t) const {
		return !sgn(x-t.x) && !sgn(y-t.y);
	}
}a[MAXN],b[MAXN],c[MAXN],t[MAXN];
int n;

inline P rotate(P v,DB sin,DB cos){
	return P(v.x*cos-v.y*sin,v.x*sin+v.y*cos);
}

int main(){
//	freopen("A.in","r",stdin);
	scanf("%d",&n);
	if(n <= 2){
		puts("Yes");
		return 0;
	}
	FOR(i,1,n) scanf("%lf%lf",&a[i].x,&a[i].y);
	FOR(i,1,n) scanf("%lf%lf",&b[i].x,&b[i].y);
	P sm2 = 0;FOR(i,1,n) sm2 = sm2+b[i];sm2 = sm2/n;
	std::sort(b+1,b+n+1);
	// a[i]*A-b[i] = a[j]*A-b[j]
	// (a[i]-a[j])*A = b[i]-b[j]
	FOR(i,1,n) FOR(j,1,n){
		if(i == j) continue;
		P u = a[1]-a[2],v = b[i]-b[j];
//		if(!sgn(u.len()) || !sgn(v.len())) continue;
		DB Cos = u.dot(v)/u.len()/v.len(),Sin = u.det(v)/u.len()/v.len();

		FOR(k,1,n) c[k] = rotate(a[k],Sin,Cos);
		P sm = 0;
		FOR(k,1,n) sm = sm+c[k];
		sm = sm/n;
		P vec = sm2-sm;

		FOR(l,1,n) t[l] = c[l]+vec;
		std::sort(t+1,t+n+1);
		bool flag = 1;
		FOR(l,1,n) flag &= t[l]==b[l];
		if(flag){
			puts("Yes");
			return 0;
		}
	}
	puts("No");
	return 0;
}
