#include <iostream>
#include <stdio.h>
#include <cstring>
#include <cstdio>
#include <math.h>
#include <algorithm>
#include <vector>
#include <string>
#include <stdlib.h>
#include <queue>
#include <stack>
#include <utility>
#include <fstream>
//#include <random>
#include <map>
#include <unordered_map>
#include <cstdlib>
#include <functional>
#include <time.h>
//#include <chrono>
#include <sstream>
#include <iomanip>
#include <numeric>
#include <iostream>
#include <limits>
#include <numeric>
#include <sstream> // std::stringstream
#include <bitset>  // std::bitset<N>
//#include <type_traits>
//#include <atcoder/scc>
#define rep(i,n) for(int i=0;i<n;i++)
#define llrep(i,n) for(ll i=0;i<n;i++)
#define rrep(i,n) for(int i=n-1;i>=0;i--)
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define RFOR(i,a,b) for(int i=b-1;i>=a;i--)
#define ll long long
#define INF 1000000001
#define MOD 1000000007
#define SORT(s) sort(s.begin(), s.end());
#define REVERSE(s) reverse(s.begin(), s.end());
#define SUM(s) accumulate(s.begin(), s.end(), 0LL);
#define P pair<ll,ll>
#define mp make_pair
#define valid(x,y,h,w) (0<=x&&x<h&&0<=y&&y<w)
#define vint vector<int>
#define vvint vector<vector<int>>
#define vll vector<ll>
#define vvll vector<vector<ll>>
#define ALL(a)  (a).begin(),(a).end()
//#define int ll
int dx[4] = { 0,1,0,-1 };
int dy[4] = { 1,0,-1,0 };
int ndx[8] = { 0,1,0,-1, 1,1,-1,-1 };
int ndy[8] = { 1,0,-1,0, 1,-1,-1,1 };
double pi = 3.141592653589793;
using namespace std;


int n;
vll a, b, c, d;

ll dis1(int i, int j) {
	return (a[i] - a[j]) * (a[i] - a[j]) + (b[i] - b[j]) * (b[i] - b[j]);
}
ll dis2(int i, int j) {
	return (c[i] - c[j]) * (c[i] - c[j]) + (d[i] - d[j]) * (d[i] - d[j]);
}

double angle1(int i, int j) {
	double radian = atan2(a[j] - a[i], b[j] - b[i]);
	return radian;
}
double angle2(int i, int j) {
	double radian = atan2(c[j] - c[i], d[j] - d[i]);
	return radian;
}

double rotex(int x, int y, double angle) {
	return x * cos(angle) - y * sin(angle);
}
double rotey(int x, int y, double angle) {
	return x * sin(angle) + y * cos(angle);
}

int main() {
	cin >> n;
	if (n == 1) {
		cout << "Yes" << endl;
		return 0;
	}
	a.resize(n);
	b.resize(n);
	c.resize(n);
	d.resize(n);
	rep(i, n) {
		cin >> a[i] >> b[i];
	}
	rep(i, n) {
		cin >> c[i] >> d[i];
	}

	rep(i, n) {
		rep(j, n) {
			//0 -> i 1->jに対応する
			if (i == j) continue;
			if (dis1(0, 1) != dis2(i, j)) continue;
			//回転角度
			double angle = angle1(0, 1) - angle2(i, j);

			auto newx1 = rotex(a[1], b[1], angle);
			auto newy1 = rotey(a[1], b[1], angle);
			//auto newx1 = a[1] * cos(angle) - b[1] * sin(angle);
			//auto newy1 = a[1] * sin(angle) + b[1] * cos(angle);

			double q = c[j] - newx1;
			double r = d[j] - newy1;;

			vector<int> use(n);
			/*use[0] = 0;
			use[1] = 0;*/
			bool F = 1;
			rep(k, n) {
				auto newx = rotex(a[k], b[k], angle) + q;
				auto newy = rotey(a[k], b[k], angle) + r;
				bool flg = 0;
				rep(m, n) {
					if (abs(newx - c[m]) < 0.0000001 && abs(newy - d[m]) < 0.0000001 && use[m] == 0) {
						use[m] = 1;
						flg = 1;
					}
				}
				if (!flg) {
					F = 0;
				}
			}
			if (F == 1) {
				cout << "Yes" << endl;
				return 0;
			}

		}
	}
	cout << "No" << endl;

}

#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cassert>
#include <cstring>
#include <string>
#include <vector>
#include <random>
#include <bitset>
#include <queue>
#include <cmath>
#include <unordered_map>
#include <set>
#include <map>
#define INCANT cin.tie(0), cout.tie(0), ios::sync_with_stdio(0), cout << fixed << setprecision(20);
#define rep(i,n) for (int i=0; i<n;++i)
#define ALL(a)  (a).begin(),(a).end()
typedef long long ll;
using namespace std;
const ll MOD = 1e9+7LL;
const int INF = 2e9;
int A[4];

int main() {
  INCANT;
  rep(i, 4) cin >> A[i];
  sort(A, A+4);
  string ans = A[0]+A[3]==A[2]+A[1] || A[3] == A[2]+A[1]+A[0]?"Yes":"No";
  cout << ans << "\n";
  return 0;
}