#include<bits/stdc++.h>
using namespace std;
#define gc() getchar()
#define pc(a) putchar(a)
#define int long long
#define inf (1ll<<60)
inline int read()
{
    int x=0,f=1;
    char c=gc();
    while(c<'0'||c>'9')
    {
        if(c=='-') f=-f;
        c=gc();
    }
    while(c>='0'&&c<='9') x=x*10+c-'0',c=gc();
//    cout<<x<<endl;
    return x*f;
}
int nnu[25];
inline void write(int x)
{
    if(x<0) pc('-'),x=-x;
    if(!x)
    {
        pc('0');
        return;
    }
    int tp=0;
    while(x) nnu[++tp]=x%10,x/=10;
    while(tp) pc(nnu[tp--]+'0');
    return;
}
#define ma 500005
%:define db double
const db eps=1e-6;
inline bool eq(db x,db y)
{
	return fabs(x-y)<=eps;
}
struct point
{
	db x,y;
}A[ma],B[ma];
inline db dis(point x,point y)
{
	return (x.x-y.x)*(x.x-y.x)+(x.y-y.y)*(x.y-y.y);
}
point O,Q;
inline db S(point a,point b)
{
	return a.x*b.y-a.y*b.x;
}
inline db S(point a,point b,point c)
{
	return S(a,b)+S(b,c)+S(c,a);
}
inline db cs(point a,point b,point c)
{
	db aa=dis(b,c),cc=dis(a,b);
	if(eq(aa,0)||eq(cc,0)) return 1e9;
	return S(a,b,c)/(aa*cc);
}
struct pq
{
	db x,y;
}a[ma],b[ma];
inline bool cmp(pq x,pq y)
{
	return eq(x.x,y.x)?x.y<y.y:x.x<y.x;
}
inline bool eq(pq x,pq y)
{
	return eq(x.x,y.x)&&eq(x.y,y.y);
}
inline void pre(int ido,int idq,point P[],pq x[],int n)
{
	O=P[ido],Q=P[idq];
	for(int i=1;i<=n;i++) x[i].x=dis(P[i],O),x[i].y=cs(P[i],O,Q);
	sort(x+1,x+n+1,cmp);
	return;
}
inline bool cpp(int n)
{
//	for(int i=1;i<=n;i++) printf("(%0.3lf,%0.3lf) ",a[i].x,a[i].y);
//	cout<<endl;
//	for(int i=1;i<=n;i++) printf("(%0.3lf,%0.3lf) ",b[i].x,b[i].y);
//	cout<<endl;
	for(int i=1;i<=n;i++) 
		if(!eq(a[i],b[i])) 
		{
//			cout<<i<<endl;
			return 0;
		}
		return 1;
}
signed main()
{
	int n=read();
	if(n==1) 
	{
		puts("Yes");
		return 0;
	}
	for(int i=1;i<=n;i++) A[i].x=read(),A[i].y=read();
	for(int i=1;i<=n;i++) B[i].x=read(),B[i].y=read();
	pre(1,2,A,a,n);
	for(int ido=1;ido<=n;ido++)
		for(int idq=1;idq<=n;idq++)
		{
			if(ido==idq) continue;
			pre(ido,idq,B,b,n);
			if(cpp(n))
			{
				puts("Yes");
				return 0;
			}
		}
	puts("No");
}













#include <bits/stdc++.h>
#define rep(i, l, r) for (int i = l; i <= r; ++i)
#define per(i, r, l) for (int i = r; i >= l; --i)
using namespace std;
const int N = 105;
const int inf = 0x3fffffff;
typedef long long ll;
int T;
int n, m;
class dot {
   public:
    int x, y;
    dot() {}
    dot(int _x, int _y) : x(_x), y(_y) {}
    dot operator-(const dot &d) const { return dot(x - d.x, y - d.y); }
    int operator*(const dot &d) { return x * d.x + y * d.y; }
    int operator/(const dot &d) { return x * d.y - y * d.x; }
    void read() { scanf("%d%d", &x, &y); }
} a[N], b[N];

int main() {
    scanf("%d", &n);
    rep(i, 1, n) { a[i].read(); }
    rep(i, 1, n) { b[i].read(); }
    bool ans = false;
    rep(i1, 1, n) {
        rep(i2, 1, n) {
            if ((b[i2] - b[i1]) * (b[i2] - b[i1]) !=
                (a[2] - a[1]) * (a[2] - a[1]))
                continue;
            // printf("%d %d:\n", i1, i2);
            bool flag = true;
            rep(i, 3, n) {
                bool f = false;
                rep(j, 1, n) {
                    if ((b[j] - b[i1]) * (b[i2] - b[i1]) ==
                            (a[i] - a[1]) * (a[2] - a[1]) &&
                        (b[j] - b[i1]) / (b[i2] - b[i1]) ==
                            (a[i] - a[1]) / (a[2] - a[1])) {
                        f = true;
                        // printf("    %d %d\n", i, j);
                        break;
                    }
                }
                if (!f) {
                    flag = false;
                    break;
                }
            }
            if (flag) {
                ans = true;
                break;
            }
        }
    }
    if (n == 1) ans = true;
    printf(ans ? "Yes\n" : "No\n");
    return 0;
}