import java.io.*;

public class Validate {
	
	class Point {
		int x, y;

		public Point(int x, int y) {
			super();
			this.x = x;
			this.y = y;
		}
	}
	
	final int maxN = 100000, minCoord = (int)-1e9, maxCoord = (int)1e9;
	
	public void run() {
        StrictScanner in = new StrictScanner(System.in);

        int n = in.nextInt();
        ensureLimits(n, 3, maxN, "n");

        Point[][] polygon = new Point[2][n];
        Point p;
        for (int i = 0; i < 2; i++) {
        	for (int j = 0; j < n; j++) {
        		in.nextLine();
        		p = new Point(in.nextInt(), in.nextInt());
        		ensure(p.x >= minCoord && p.x <= maxCoord && p.y >= minCoord && p.y <= maxCoord, "Wrong coordinates");
        		polygon[i][j] = p;
        	}
        }
        in.nextLine();
        
        ensure(isConvex(polygon[0]), "Polygon[0] is not convex");
        ensure(isConvex(polygon[1]), "Polygon[1] is not convex");

        in.close();
    }
	
	static long cross(Point a, Point b, Point c) {
		long res = ((long) b.x - a.x) * ((long) c.y - b.y)
				- ((long) b.y - a.y) * ((long) c.x - b.x);
		if (res != 0) {
			res /= Math.abs(res);
		}
		return res;
	}
	
	boolean isConvex(Point[] p) {
		long direction = cross(p[0], p[1], p[2]);
		for (int i = 0; i < p.length; i++) {
			long cur = cross(p[i], p[(i + 1) % p.length], p[(i + 2) % p.length]);
			if (cur * direction <= 0) return false;
		}
		return true;
	}

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

    public class StrictScanner {
        private BufferedReader in;
        private String line = "";
        private int pos;
        private int lineNo;

        public StrictScanner(InputStream source) {
            in = new BufferedReader(new InputStreamReader(source));
            nextLine();
        }

        public void close() {
            ensure(line == null, "Extra data at the end of file");
            try {
                in.close();
            } catch (IOException e) {
                throw new AssertionError("Failed to close with " + e);
            }
        }

        public void nextLine() {
            ensure(line != null, "EOF");
            ensure(pos == line.length(), "Extra characters on line " + lineNo);
            try {
                line = in.readLine();
            } catch (IOException e) {
                throw new AssertionError("Failed to read line with " + e);
            }
            pos = 0;
            lineNo++;
        }

        public String next() {
            ensure(line != null, "EOF");
            ensure(line.length() > 0, "Empty line " + lineNo);
            if (pos == 0)
                ensure(line.charAt(0) > ' ', "Line " + lineNo
                        + " starts with whitespace");
            else {
                ensure(pos < line.length(), "Line " + lineNo + " is over");
                ensure(line.charAt(pos) == ' ', "Wrong whitespace on line "
                        + lineNo);
                pos++;
                ensure(pos < line.length(), "Line " + lineNo + " is over");
                ensure(line.charAt(0) > ' ', "Line " + lineNo
                        + " has double whitespace");
            }
            StringBuilder sb = new StringBuilder();
            while (pos < line.length() && line.charAt(pos) > ' ')
                sb.append(line.charAt(pos++));
            return sb.toString();
        }

        public int nextInt() {
            String s = next();
            ensure(s.length() == 1 || s.charAt(0) != '0',
                    "Extra leading zero in number " + s + " on line " + lineNo);
            ensure(s.charAt(0) != '+', "Extra leading '+' in number " + s
                    + " on line " + lineNo);
            try {
                return Integer.parseInt(s);
            } catch (NumberFormatException e) {
                throw new AssertionError("Malformed number " + s + " on line "
                        + lineNo);
            }
        }

        public long nextLong() {
            String s = next();
            ensure(s.length() == 1 || s.charAt(0) != '0',
                    "Extra leading zero in number " + s + " on line " + lineNo);
            ensure(s.charAt(0) != '+', "Extra leading '+' in number " + s
                    + " on line " + lineNo);
            try {
                return Long.parseLong(s);
            } catch (NumberFormatException e) {
                throw new AssertionError("Malformed number " + s + " on line "
                        + lineNo);
            }
        }

        public double nextDouble() {
            String s = next();
            ensure(s.length() == 1 || s.startsWith("0.") || s.charAt(0) != '0',
                    "Extra leading zero in number " + s + " on line " + lineNo);
            ensure(s.charAt(0) != '+', "Extra leading '+' in number " + s
                    + " on line " + lineNo);
            try {
                return Double.parseDouble(s);
            } catch (NumberFormatException e) {
                throw new AssertionError("Malformed number " + s + " on line "
                        + lineNo);
            }
        }
    }

    void ensure(boolean b, String message) {
        if (!b) {
            throw new AssertionError(message);
        }
    }

    void ensureLimits(long n, long from, long to, String name) {
        ensure(from <= n && n <= to, name + " must be from " + from + " to "
                + to);
    }

}