import java.io.*;
import java.util.*;

public class fields_bm {
	FastScanner in;
	PrintWriter out;

	int n;
	long[][] p1;
	long[][] p2;
	long[][] p3;
	int start;
	
	void revX() {
		for (int i = 0; i < n; i++) {
			p3[i][0] = -p3[i][0];
		}
	}
	
	void revY() {
		for (int i = 0; i < n; i++) {
			p3[i][1] = -p3[i][1];
		}
	}
	
	void revYeqX() {
		for (int i = 0; i < n; i++) {
			long tmp = p3[i][0];
			p3[i][0] = p3[i][1];
			p3[i][1] = tmp;
		}
	}
	
	boolean same(int st, long addX, long addY, int add) {
		int it1 = start;
		int it3 = st;
		for (int i = 0; i < n; i++) {
			if (p3[it3][0] + addX != p1[it1][0])
				return false;
			if (p3[it3][1] + addY != p1[it1][1])
				return false;
			it1 = (it1 + 1) % n;
			it3 = (it3 + add + n) % n;
		}
		return true;
	}
	
	void solve() {
		n = in.nextInt();
		p1 = new long[n][2];
		p2 = new long[n][2];
		p3 = new long[n][2];
		for (int i = 0; i < n; i++) {
			p1[i][0] = in.nextInt();
			p1[i][1] = in.nextInt();
		}
		for (int i = 0; i < n; i++) {
			p2[i][0] = in.nextInt();
			p2[i][1] = in.nextInt();
		}
		start = 0;
		for (int i = 1; i < n; i++) {
			if (p1[i][0] < p1[start][0])
				start = i;
			if (p1[i][0] == p1[start][0] && p1[i][1] < p1[start][1])
				start = i;
		}
		for (int rX = 0; rX < 2; rX++)
			for (int rY = 0; rY < 2; rY++)
				for (int rYX = 0; rYX < 2; rYX++) {
					for (int i = 0; i < n; i++) 
						for (int j = 0; j < 2; j++)
							p3[i][j] = p2[i][j];
					if (rX != 0)
						revX();
					if (rY != 0)
						revY();
					if (rYX != 0)
						revYeqX();
					int st = 0;
					for (int i = 1; i < n; i++) {
						if (p3[i][0] < p3[st][0])
							st = i;
						if (p3[i][0] == p3[st][0] && p3[i][1] < p3[st][1])
							st = i;
					}
					long addX = p1[start][0] - p3[st][0];
					long addY = p1[start][1] - p3[st][1];
					if (same(st, addX, addY, 1)) {
						out.println("YES");
						return;
					}
					if (same(st, addX, addY, -1)) {
						out.println("YES");
						return;
					}
				}
		out.println("NO");
	}

	void run() {
		try {
			in = new FastScanner(new File("fields.in"));
			out = new PrintWriter(new File("fields.out"));

			solve();

			out.close();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
	}

	void runIO() {

		in = new FastScanner(System.in);
		out = new PrintWriter(System.out);

		solve();

		out.close();
	}

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

		public FastScanner(InputStream f) {
			br = new BufferedReader(new InputStreamReader(f));
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				String s = null;
				try {
					s = br.readLine();
				} catch (IOException e) {
					e.printStackTrace();
				}
				if (s == null)
					return null;
				st = new StringTokenizer(s);
			}
			return st.nextToken();
		}

		boolean hasMoreTokens() {
			while (st == null || !st.hasMoreTokens()) {
				String s = null;
				try {
					s = br.readLine();
				} catch (IOException e) {
					e.printStackTrace();
				}
				if (s == null)
					return false;
				st = new StringTokenizer(s);
			}
			return true;
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}
	}

	public static void main(String[] args) {
		new fields_bm().run();
	}
}