//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <climits>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <queue>
#include <random>
#include <cctype>
#include <complex>
#include <regex>

using namespace std;

#define C_MAX(a, b) ((a)>(b)?(a):(b))
#define SHOW_VECTOR(v) {std::cerr << #v << "\t:";for(const auto& xxx : v){std::cerr << xxx << " ";}std::cerr << "\n";}
#define SHOW_MAP(v) {std::cerr << #v << endl; for(const auto& xxx: v){std::cerr << xxx.first << " " << xxx.second << "\n";}}

#define EPS 1e-8
#define EQ(a, b) (abs((a)-(b)) < EPS)
const double PI = acos(-1.0);

inline int signum(double x) { return (abs(x) < EPS) ? 0 : (x > 0) ? 1 : -1; }

typedef complex<double> P;
typedef vector<P> Poly;

double dot(P a, P b) {
    return a.real() * b.real() + a.imag() * b.imag();
}

double cross(P a, P b) {
    return a.real() * b.imag() - a.imag() * b.real();
}

double toRadian(double degree) {
    return degree * PI / 180.0;
}

double toDegree(double radian) {
    return radian * 180.0 / PI;
}

int ccw(P a, P b, P c) {
    b -= a;
    c -= a;
    int sign = signum(cross(b, c));
    if (sign != 0) return sign;
    if (signum(dot(b, c)) == -1) return 2;
    if (abs(b) < abs(c)) return -2;
    return 0;
}

double dis_p_li(P a, P b, P c) {
    b -= a;
    c -= a;
    return abs(cross(b, c)) / abs(b);
}

double dis_p_li_ss(P a, P b, P c) {
    P x1 = b - a;
    P y1 = c - a;
    P x2 = a - b;
    P y2 = c - b;
    if (signum(dot(x1, y1)) < 0) return abs(y1);
    if (signum(dot(x2, y2)) < 0) return abs(y2);
    return dis_p_li(a, b, c);
}

bool is_intersected_li_ss(P a1, P a2, P b1, P b2) {
    return (ccw(a1, a2, b1) * ccw(a1, a2, b2) <= 0) &&
           (ccw(b1, b2, a1) * ccw(b1, b2, a2) <= 0);
}

double dis_li_s_li_s(P a1, P a2, P b1, P b2) {
    if (is_intersected_li_ss(a1, a2, b1, b2)) return 0.0;
    return min({
                       dis_p_li_ss(a1, a2, b1),
                       dis_p_li_ss(a1, a2, b2),
                       dis_p_li_ss(b1, b2, a1),
                       dis_p_li_ss(b1, b2, a2)
               });
}

double area_tri(double a, double b, double c) {
    double s = (a + b + c) / 2;
    return sqrt(s * (s - a) * (s - b) * (s - c));
}

double area_tri(P a, P b, P c) {
    double x = abs(b - a);
    double y = abs(c - b);
    double z = abs(a - c);
    return area_tri(x, y, z);
}

double area_poly(Poly poly) {
    if (poly.size() < 3) return 0.0;
    double ans = 0.0;
    for (int i = 0; i < poly.size(); i++) ans += cross(poly[i], poly[(i + 1) % poly.size()]);
    return abs(ans) / 2.0;
}

bool is_convex_poly(Poly poly) {
    if (poly.size() < 3)return false;
    int s = -3;
    int n = poly.size();
    for (int i = 0; i < poly.size(); i++) {
        int r = ccw(poly[i % n], poly[(i + 1) % n], poly[(i + 2) % n]);
        if (abs(r) == 1 && s == -3) s = r;
        if (s * r == -1) return false;
    }
    return true;
}

int main() {

    int N;
    cin >> N;

    Poly poly(N);
    for (int i = 0; i < N; i++) {
        double x, y;
        cin >> x >> y;
        poly[i] = P(x, y);
    }


    bool result = is_convex_poly(poly);

    if (result) cout << 1 << endl;
    else cout << 0 << endl;
}














































Measured memory_bytes: 3280