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

public class fields_akov {
	FastScanner in;
	PrintWriter out;

	class Point {
		int x, y;

		public Point(int x, int y) {
			super();
			this.x = x;
			this.y = y;
		}

		public Point(Point point) {
			x = point.x;
			y = point.y;
		}
	}
	
	Point[][] polygon;
	Point[] cur;
	
	void invertX() {
		for (Point p : cur) {
			p.x = -p.x;
		}
	}
	
	void invertY() {
		for (Point p : cur) {
			p.y = -p.y;
		}
	}
	
	void invert45() {
		for (Point p : cur) {
			int tmp = p.x;
			p.x = p.y;
			p.y = tmp;
		}
	}
	
	void reverse(Point[] a) {
		int i = 0, j = a.length - 1;
		while (i < j) {
			Point tmp = a[i];
			a[i] = a[j];
			a[j] = tmp;
			i++;
			j--;
		}
	}
	
	boolean equal(Point[] a, int sta, Point[] b, int stb) {
		Point p1 = a[sta], p2 = b[stb];
		Point shift = new Point(p1.x - p2.x, p1.y - p2.y);
		assert a.length == b.length;
		for (int i = 0; i < a.length; i++) {
			p1 = a[(sta + i) % a.length];
			p2 = b[(stb + i) % b.length];
			if (p1.x - p2.x != shift.x || p1.y - p2.y != shift.y) {
				return false;
			}
		}
		return true;
	}
	
	public void solve() throws IOException {
		int n = in.nextInt();
		polygon = new Point[2][n];
		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < n; j++) {
				polygon[i][j] = new Point(in.nextInt(), in.nextInt());
			}
		}
		int startRes = 0;
		cur = polygon[1];
		for (int i = 0; i < n; i++) {
			if (cur[i].y < cur[startRes].y || (cur[i].y == cur[startRes].y && cur[i].x < cur[startRes].x)) {
				startRes = i;
			}
		}
		cur = new Point[n];
		for (int profile = 0; profile < 8; profile++) {
			for (int i = 0; i < n; i++) {
				cur[i] = new Point(polygon[0][i]);
			}
			if ((profile & 1) != 0) {
				invertX();
			}
			if ((profile & 2) != 0) {
				invertY();
			}
			if ((profile & 4) != 0) {
				invert45();
			}
			for (int i = 0; i < 2; i++) {
				int startCur = 0;
				for (int j = 0; j < n; j++) {
					if (cur[j].y < cur[startCur].y || (cur[j].y == cur[startCur].y && cur[j].x < cur[startCur].x)) {
						startCur = j;
					}
				}
				if (equal(cur, startCur, polygon[1], startRes)) {
					out.print("YES");
					return;
				}
				reverse(cur);
			}
		}
		out.println("NO");
	}

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

			solve();

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

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;

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

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

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

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

		double nextDouble() {
			return Double.parseDouble(next());
		}

	}

	public static void main(String[] arg) {
		new fields_akov().run();
	}
}