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

public class convex_aa_wrong implements Runnable {

	public static void main(String[] args) {
		new Thread(new convex_aa_wrong()).start();
	}

	public void run() {
		try {
			solve();
		} catch (IOException e) {
		}
	}

	private void MyAssert(boolean u, String message) {
		if (!u) {
			throw new Error("Assertion failed!!! " + message);
		}
	}

	BufferedReader br;

	StringTokenizer st;

	PrintWriter out;

	boolean eof = false;

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

	String nextToken(String delim) {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(br.readLine(), delim);
			} catch (IOException e) {
				eof = true;
				return "0";
			}
		}
		return st.nextToken(delim);
	}

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

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

	int nextInt(String delim) {
		return Integer.parseInt(nextToken(delim));
	}

	String FILENAME = "convex";

	void solve() throws IOException {
		br = new BufferedReader(new FileReader(FILENAME + ".in"));
		out = new PrintWriter(FILENAME + ".out");
		int n = nextInt();
		long[] x = new long[n];
		long[] y = new long[n];
		for (int i = 0; i < y.length; i++) {
			x[i] = nextLong();
			y[i] = nextLong();
		}
		long ss = x[1] * y[0] - x[1] * y[2] + x[2] * y[1] - x[2] * y[0] + x[0]
				* y[2] - x[0] * y[1];
		boolean good = true;
		for (int i = 2; i < y.length; i++) {
			long s = x[(i + 1) % n] * y[(i + 0) % n] - x[(i + 1) % n]
					* y[(i + 2) % n] + x[(i + 2) % n] * y[(i + 1) % n]
					- x[(i + 2) % n] * y[(i + 0) % n] + x[(i + 0) % n]
					* y[(i + 2) % n] - x[(i + 0) % n] * y[(i + 1) % n];
			if ((s < 0 && ss > 0) || (s > 0 && ss < 0)) {
				good = false;
				break;
			}
		}
		out.println(good ? "YES" : "NO");
		out.close();
	}
}
