#include <bits/stdc++.h>
#define int long long
#define endl '\n'
#define FOR(i, a, n) for (int i = (a); i < (n); ++i)
#define REP(i, n) FOR(i, 0, n)
using namespace std;

using T = double;
const T EPS = 1e-10;
T torad(int deg) {return (T)(deg) * M_PI / 180;}
T todeg(T ang) {return ang * 180 / M_PI;}

/* Point */
using P = complex<T>;
#define x real()
#define y imag()
template <typename T> inline bool eq(T p, T q) { return abs(p - q) < EPS; }
inline int sgn(T x) { return (T(0) < x) - (x < T(0)); }
inline T dot(P v, P w) { return (conj(v) * w).x; }
inline T cross(P v, P w) { return (conj(v) * w).y; }
inline bool isOrth(P v, P w) { return dot(v, w) == 0; }
inline bool isPara(P v, P w) { return cross(v, w) == 0; }
inline P translate(P p, P v) { return p + v; }
inline P scale(P p, P c, T k) { return c + (p - c) * k; }
inline P rot(P p, T a) { return p * polar(1.0, a); }
inline P rot90(P p) { return {-p.y, p.x}; }
inline T orient(P a, P b, P c) { return cross(b - a, c - a); }
istream& operator>>(istream& is, P& p) { T xx, yy; is >> xx >> yy; p = P(xx, yy); return is; }
bool cmpX(const P& a, const P& b) { return a.x != b.x ? a.x < b.x : a.y < b.y; }
namespace std {
    bool operator < (const P& a, const P& b) { return cmpX(a, b); }
}

/* Polygon */
vector<P> makeStandard(vector<P> p) {
    int n = p.size(), j = -1;
    for (int i = 0; i < n; ++i) {
        if (j == -1 || p[i].y < p[j].y) j = i;
    }
    vector<P> res;
    if (p[(j - 1 + n) % n].x <= p[j].x && p[j].x <= p[(j + 1) % n].x) {
        for (int i = 0; i < n; ++i) {
            res.push_back(p[(i + j) % n]);
        }
    } else {
        for (int i = 0; i < n; ++i) {
            res.push_back(p[(i - j + n) % n]);
        }
    }
    return res;
}
bool isConvex(vector<P> p) {
    p = makeStandard(p);    // p[0] has minimum y and p is counterclockwise
    for (int i = 0, n = p.size(); i < n; ++i) {
        P a = p[i], b = p[(i + 1) % n], c = p[(i + 2) % n];
        if (orient(a, b, c) < 0) return false;
        if (b.y != p[0].y && b.y < min(a.y, c.y)) return false;
        if (b.y != p[0].y && a.y == b.y && b.y == c.y && a.x <= b.x && b.x <= c.x) return false;
    }
    return true;
}

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int n;
    cin >> n;
    vector<P> ps(n);
    REP (i, n) cin >> ps[i];
    cout << isConvex(ps) << endl;
}
