#include <bits/stdc++.h>
using namespace std;
constexpr double EPS = 1e-14;

struct vec2 {
    double x, y;
    vec2 operator+(const vec2 rhs) {
        return {x + rhs.x, y + rhs.y};
    }
    vec2 operator-(const vec2 rhs) {
        return {x - rhs.x, y - rhs.y};
    }
    vec2 operator*(const double k) {
        return {x * k, y * k};
    }
    vec2 operator/(const double k) {
        return {x / k, y / k};
    }
};

void printvec2(vec2 p, int precision) {
    cout << setprecision(precision) << fixed << p.x << " " << p.y << endl;
}

double dot(vec2 a, vec2 b) {
    return a.x * b.x + a.y * b.y;
};

double norm2(vec2 a) {
    return dot(a, a);
}

struct line {
    vec2 p, l;
};

line make_line(vec2 a, vec2 b) {
    return {a, b - a};
}

double cross(vec2 a, vec2 b) {
    return a.x * b.y - a.y * b.x;
}

bool is_parallel(vec2 a, vec2 b) {
    return abs(cross(a, b)) < EPS;
}

bool is_parallel(line a, line b) {
    return is_parallel(a.l, b.l);
}

double operator/(vec2 a, vec2 b) {
    assert(is_parallel(a, b));
    return abs(b.x) < EPS ? a.y / b.y : a.x / b.x;
}

vec2 intersection(line l1, line l2) {
    assert(!is_parallel(l1, l2));
    double a = l1.p.x, b = l1.p.y, c = l1.l.x, d = l1.l.y;
    double e = l2.p.x, f = l2.p.y, g = l2.l.x, h = l2.l.y;
    double k = (h * (a - e) - g * (b - f)) / (g * d - c * h);
    return {
        a + k * c,
        b + k * d
    };
}

vec2 get_normal(vec2 p) {
    return {-p.y, p.x};
}

vec2 foot(vec2 p, line l) {
    line normal = {p, get_normal(l.l)};
    return intersection(normal, l);
}

vec2 reflect(vec2 p, line l) {
    vec2 f = foot(p, l);
    return {2 * f.x - p.x, 2 * f.y - p.y};
}

double dist2(vec2 p, line l) {
    return norm2(foot(p, l) - p);
}

double dist2(vec2 p, vec2 q) {
    return norm2(q - p);
}

int sgn(double a) {
    if (a < -EPS) return -1;
    if (a > EPS) return 1;
    return 0;
}

struct segment {
    vec2 a, b;
};

segment make_segment(vec2 a, vec2 b) {
    return {a, b};
}

double dist2(vec2 p, segment s) {
    vec2 l = s.a, r = s.b;
    for (int i = 0; i < 100; i++) {
        vec2 ml = (l + r) / 3;
        vec2 mr = (l + r) * 2 / 3;
        if (dist2(p, ml) > dist2(p, mr)) {
            l = ml;
        } else {
            r = mr;
        }
    }
    return dist2(p, l);
}

template<class T>
struct ext {
    double val;
    T x, y;
};

template<class T>
ext<T> ternary_2d(function<double(T, T)> f, T xl, T xr, T yl, T yr, bool maximum = true) {
    if (!maximum) {
        function<double(T, T)> g = [&](T a, T b){return -f(a, b);};
        ext<T> ret = ternary_2d(g, xl, xr, yl, yr, true);
        return {-ret.val, ret.x, ret.y};
    }
    // fix y
    function<ext<T>(T, T, T)> fx = [&](T y, T l, T r) {
        for (int i = 0; i < 100; i++) {
            T ml = (l * 2 + r) / 3.0;
            T mr = (l + r * 2) / 3.0;
            if (f(ml, y) < f(mr, y)) {
                l = ml;
            } else {
                r = mr;
            }
        }
        ext<T> ret;
        ret.x = l;
        ret.y = y;
        ret.val = f(l, y);
        return ret;
    };

    for (int i = 0; i < 100; i++) {
        T ml = (yl * 2 + yr) / 3.0;
        T mr = (yl + yr * 2) / 3.0;
        if (f(fx(ml, xl, xr).x, ml) < f(fx(mr, xl, xr).x, mr)) {
            yl = ml;
        } else {
            yr = mr;
        }
    }
    ext<T> ret;
    ret.x = fx(yl, xl, xr).x;
    ret.y = yl;
    ret.val = f(ret.x, ret.y);
    return ret;
}

double dist2(segment s, segment t) {
    ext<vec2> ans;
    function<double(vec2, vec2)> d = [&](vec2 a, vec2 b) {
        return norm2(b - a);
    };
    ans = ternary_2d(d, s.a, s.b, t.a, t.b, false);
    return ans.val;
}

vec2 intersection(segment s, segment t) {
    ext<vec2> ans;
    function<double(vec2, vec2)> d = [&](vec2 a, vec2 b) {
        return norm2(b - a);
    };
    ans = ternary_2d(d, s.a, s.b, t.a, t.b, false);
    assert(ans.val < EPS);
    return {ans.x.x, ans.x.y};
}

struct triangle {
    // counter clockwise
    vec2 a, b, c;
};

double area(triangle t) {
    return cross(t.b - t.a, t.c - t.a) / 2;
}

// counter clockwise
using polygon = vector<vec2>;

double area(polygon p) {
    double ret = 0;
    assert(p.size() >= 3);
    for (int i = 1; i < p.size() - 1; i++) {
        triangle t = {p.front(), p[i], p[i + 1]};
        ret += area(t);
    }
    return ret;
}

int ccw(vec2 a, vec2 b, vec2 c) {
    b = b - a;
    c = c - a;
    int s = sgn(cross(b, c));
    if (s == -1) {
        // CLOCKWISE
        return -1;
    } else if (s == 1) {
        // COUNTER_CLOCKWISE
        return 1;
    } else {
        double k = c / b;
        if (k < -EPS) {
            // ONLINE_BACK
            return -2;
        } else if (k > 1 + EPS) {
            // ONLINE_FRONT
            return 2;

        } else {
            // ON_SEGMENT
            return 0;
        }
    }
}

bool is_convex(polygon p, bool strict = true) {
    int n = p.size();
    assert(p.size() >= 3);
    p.push_back(p[0]);
    p.push_back(p[1]);
    for (int i = 0; i < n; i++) {
        if (strict) {
            if (ccw(p[i], p[i + 1], p[i + 2]) != 1) {
                return false;
            }
        } else {
            if (ccw(p[i], p[i + 1], p[i + 2]) == -1) {
                return false;
            }
        }
    }
    return true;
}

int main() {
    int n;
    cin >> n;
    polygon p;
    for (int i = 0; i < n; i++) {
        double x, y;
        cin >> x >> y;
        p.push_back({x, y});
    }
    cout << (is_convex(p, false) ? 1 : 0) << endl;
}



Measured memory_bytes: 3224