#include <bits/stdc++.h>

using namespace std;

const long double EPS = 1e-8;

long double eq(long double a, long double b){
  return fabs(a - b) < EPS;
}

struct point {
  long double x, y;

  point(long double _x=0, long double _y=0) :
    x(_x), y(_y) {}

  bool operator == (point &o) const {
    return eq(x, o.x) and eq(y, o.y);
  }

  bool operator < (point &o) const {
    if(!eq(x, o.x)) return x < o.x;
    if(!eq(y, o.y)) return y < o.y;
    return false;
  }

  bool operator <= (point &o) const {
    if(*this == o) return true;
    return *this < o;
  }
};

void rotate_set(vector<point> &P, long double angle){
  long double sin_angle = sin(angle);
  long double cos_angle = cos(angle);

  for(point &p : P){
    p = point(p.x * cos_angle - p.y * sin_angle,
	      p.x * sin_angle + p.y * cos_angle);
  }
}

vector<point> normalize(int a[], int b[], int N, int i1, int i2){
  vector<point> P(N);
  
  for(int i = 0; i < N; i++){
    P[i] = point(a[i], b[i]);
  }

  double pivot_x = P[i1].x;
  double pivot_y = P[i1].y;

  for(point &p : P){
    p.x -= pivot_x;
    p.y -= pivot_y;
  }

  long double angle = atan2(P[i2].y, P[i2].x);
  rotate_set(P, -angle);

  return P;
}

bool are_the_same(vector<point> &S, vector<point> &T){
  sort(S.begin(), S.end());
  sort(T.begin(), T.end());

  for(int i = 0; i < S.size(); i++){
    if(!(S[i] == T[i])) return false;
  }

  return true;
}

int main(){
  int N;
  while(scanf("%d", &N) > 0){
    int a[N], b[N], c[N], d[N];

    for(int i = 0; i < N; i++){
      scanf("%d%d", &a[i], &b[i]);
    }
    
    for(int i = 0; i < N; i++){
      scanf("%d%d", &c[i], &d[i]);
    }

    if(N == 1){
      printf("Yes\n");
      continue;
    }

    vector<point> T = normalize(c, d, N, 0, 1);
    bool test = false;

    for(int i = 0; i < N and !test; i++){
      for(int j = 0; j < N and !test; j++){
	if(i == j) continue;
	vector<point> S = normalize(a, b, N, i, j);

	if(are_the_same(S, T)){
	  test = true;
	}
      }
    }

    printf("%s\n", test ? "Yes" : "No");
  }
}

#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);}
	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);
	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);

		FOR(k,1,n){
			P vec = b[k]-c[1];
			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;
}
