import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] ax = new int[n]; int[] ay = new int[n]; float[] ag = new float[n - 1]; String result = "YES"; for(int a0 = 0; a0 < n; a0++){ int x = in.nextInt(); int y = in.nextInt(); ax[a0] = x; ay[a0] = y; if (a0 > 2) { if (Math.abs(ay[a0 - 1] - y) != Math.abs(ay[a0 -2] -ay[a0 - 1]) || Math.abs(ax[a0 - 1] - x) != Math.abs(ax[a0 -2] -ax[a0 - 1])) { result = "NO"; } } } System.out.println(result); } }