//Problem "Convex"
//10th Internet Olympiad, season 2007-2008
//Problem Author:  Fedor Tsarev, tsarev@rain.ifmo.ru
//Solution Author: Vladimir Ulyantsev, ulyantsev@rain.ifmo.ru

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

public class convex_vu {

	static void myAssert(boolean e, String message) {
		if (!e) {
			throw new Error("Test error " + message);
		}
	}

	static long vect(long x1, long y1, long x2, long y2) {
		return (x1 * y2 - x2 * y1);
	}

	static int sign(long a) {
		if (a < 0) {
			return -1;
		} else if (a == 0) {
			return 0;
		}
		return 1;
	}

	static boolean segmentsIntersect(long x1, long y1, long x2, long y2, 
				  long x3, long y3, long x4, long y4) {
		if (!(Math.min(x1, x2) <= Math.max(x3, x4) && 
		      Math.min(y1, y2) <= Math.max(y3, y4) &&
		      Math.min(x3, x4) <= Math.max(x1, x2) && 
		      Math.min(y3, y4) <= Math.max(y1, y2))) {
			return false;
		}
		int v1 = sign(vect(x2 - x1, y2 - y1, x4 - x1, y4 - y1));
		int v2 = sign(vect(x2 - x1, y2 - y1, x3 - x1, y3 - y1));
                int v3 = sign(vect(x4 - x3, y4 - y3, x2 - x3, y2 - y3));
		int v4 = sign(vect(x4 - x3, y4 - y3, x1 - x3, y1 - y3));
                
                return (v1 * v2 <= 0) && (v3 * v4 <= 0);
	}

	static boolean isNonIntersect(long[] x, long[] y) {
		int n = x.length;
		for (int i = 0; i < n; i++) {
			if (vect(x[(i + 1) % n] - x[i], y[(i + 1) % n] - y[i], 
				 x[(i + 2) % n] - x[(i + 1) % n], y[(i + 2) % n] - y[(i + 1) % n]) == 0) {
				return false;
			}
		}
		for (int i = 0; i < n - 1; i++) {
			for (int j = i + 2; j < n; j++) {
				if ((j + 1) % n != i && 
				    segmentsIntersect(x[i], y[i], x[i + 1], y[i + 1], 
				    x[j], y[j], x[(j + 1) % n], y[(j + 1) % n])) {
					return false;
				}		
			}
		}
		return true;
	}

	public static void main(String[] args) throws IOException {
		long maxx = 100000000;	
        	Scanner in = new Scanner(new File("convex.in"));
		PrintWriter out = new PrintWriter(new File("convex.out"));
		
		int n = in.nextInt();
		myAssert(4 <= n && n <= 1000, "n");
		long[] x = new long[n];
		long[] y = new long[n];
		for (int i = 0; i < n; i++) {
			x[i] = in.nextInt();
			y[i] = in.nextInt();
			myAssert(Math.abs(x[i]) <= maxx && Math.abs(y[i]) <= maxx, "x, y");
		}
		myAssert(isNonIntersect(x, y), "Intersection");
		
		boolean ans = true;
		for (int i = 0; i < n; i++) {
			long x1 = x[(i + 1) % n] - x[i];
			long y1 = y[(i + 1) % n] - y[i];
			long x2 = -x[(i + 1) % n] + x[(i + 2) % n];
			long y2 = -y[(i + 1) % n] + y[(i + 2) % n];
			if (x1 * y2 - x2 * y1 < 0) {
				ans = false;
			}
		}
		if (ans) {
			out.print("YES");
		} else {
			out.print("NO");
		}

		in.close();
		out.close();
	}

}