#include <iostream>
#include <vector>
#include <cstdlib>
using namespace std;

template <class T> void readVal(vector<T>& vec, int idx) {
    T input;
    std::cin >> input;
    vec[idx] = input;
}

int main()
{
    int size;
    cin >> size;
    vector<int> x(size); 
    vector<int> y(size);
    for (int i = 0; i < size; i++) {
        readVal(x, i);
        readVal(y, i);
    }
    int ans(1), dir(0), vecx(0), vecy(0), new_vecx(0), new_vecy(0);
    for (int i = 0; i <= size; i++) {
        new_vecx = x[(i + 1) % size] - x[i % size];
        new_vecy = y[(i + 1) % size] - y[i % size];
        int cross_prod = (vecx * new_vecy - vecy * new_vecx);
        if (cross_prod != 0) {
            if ((dir = cross_prod * dir) >= 0) {
                dir \= abs(dir);
            }
            else {
                ans = 0;
                break;
            }
        }
        vecx = new_vecx;
        vecy = new_vecy;
    }
    cout << ans << "\n";
    return 0;
}


