// ＵＴＦ−８

#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>
using namespace std;

// #pragma GCC target ("avx2")
// #pragma GCC optimization ("O3")
// #pragma GCC optimization ("unroll-loops")

/* // Ordered Set
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds;
template<typename T>
using ordered_set = tree<T, null_type,less<T>, rb_tree_tag,tree_order_statistics_node_update>;
#define os_find(k) find_by_order(k)
#define os_order(k) order_of_key(k)
*/

typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
typedef vector<int> vi;
typedef vector<long long> vll;
#define f0(i,a,b) for(int i=a;i<b;i++)
#define f1(i,a,b) for(int i=a;i<=b;i++)
#define f2(i,a,b) for(int i=a;i>b;i--)
#define f3(i,a,b) for(int i=a;i>=b;i--)
#define all(a) a.begin(),a.end()
// or add ll at the end for long long
#define cntleadz(x) __builtin_clz(x)
#define cnttrailz(x) __builtin_ctz(x)
#define cntpop(x) __builtin_popcountll(x)
#define binparity(x) __builtin_parity(x)
#define pb push_back
#define pii pair<int,int>
#define int long long
#define fi first
#define se second
#define debug_vector(v)			\
	for(auto x : v)             \
		cout<<x<<' ';           \
	cout<<'\n'
#define debug_pvector(v)        \
    for (auto x : v)            \
        cout<<x.fi<<' '<<x.se<<'\n';
#define debug(x) cout<<#x<<" = "<<x<<'\n'
#define mod 1000000007
// #define mod 998244353
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define make_graph(k) int x,y; f0(i,0,k){cin>>x>>y; adj[x].pb(y); adj[y].pb(x);}
#define test int t;cin>>t;while(t--)

ll binExp(ll x,ll n,ll m)
{
    ll res=1;
    while(n)
    {
        if(n&1) res=(res*x)%m;
        x=(x*x)%m;
        n>>=1;
    }
    return res;
}

ll modInv(ll i, ll m) {return binExp(i,m-2,m);}
ll add(ll a, ll b) {ll res = a+b; if(res >= mod) res -= mod; if(res < 0) res += mod; return res;}
ll mul(ll a, ll b) {ll res = (a)*(b); res %= mod; if(res < 0) res += mod; return res;}
// ll fact[1000006];
// ll ncr(int n,int r) {return (n>=r?(fact[n]*modInv(fact[r],mod))%mod*modInv(fact[n-r],mod)%mod:0);}



void solve()
{
    int n;
    cin>>n;

    vector<int> a(n), b(n), c(n), d(n);

    int x = 0, y = 0;
    f0(i,0,n)
    {
        cin>>a[i]>>b[i];
        x += a[i];
        y += b[i];
        a[i] *= n;
        b[i] *= n;
    }
    f0(i,0,n)
    {
        a[i] -= x;
        b[i] -= y;
    }

    x = y = 0;
    f0(i,0,n)
    {
        cin>>c[i]>>d[i];
        x += c[i];
        y += d[i];
        c[i] *= n;
        d[i] *= n;
    }
    f0(i,0,n)
    {
        c[i] -= x;
        d[i] -= y;
    }

    f0(i,0,n)
    {
        if(a[i] || b[i])
        {
            swap(a[0],a[i]);
            swap(b[0],b[i]);
        }
    }

    double err = 1e-6;
    string ans = "No";

    f0(i,0,n)
    {
        double shift = atan2(d[i],c[i]) - atan2(b[0],a[0]);
        bool yes = true;
        f0(j,0,n)
        {
            double x = a[j]*cos(shift)-b[j]*sin(shift);
            double y = a[j]*sin(shift)+b[j]*cos(shift);
            bool yes_here = false;
            f0(k,0,n)
            {
                if(abs(x-c[k]) <= err && abs(y-d[k]) <= err) yes_here = true;
            }
            yes &= yes_here;
        }
        if(yes) ans = "Yes";
    }
    cout<<ans<<'\n';
}

signed main()
{
    fast

    clock_t start,end;
    #ifndef ONLINE_JUDGE
        freopen("input.txt","r",stdin);
        freopen("output.txt","w",stdout);
    #endif
    start = clock();

    

    int tc;
    tc = 1;
    // cin>>tc;
    f1(i,1,tc)
        solve();

    end = clock();
    double time_taken = double(end-start) / double(CLOCKS_PER_SEC);
    // cout<<time_taken<<" sec";
}