#include <algorithm>
#include <cmath>
#include <iostream>
#include <queue>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#ifndef NULL
#define NULL 0
#endif
using namespace std;

const int MAXN = 50000 + 10;
const double pi = acos(-1.0);
const double inf = 1e100;
const double eps = 1e-12;

int zhengfu(double d)
{
    if (fabs(d) < eps)
        return 0;
    if (d > 0)
        return 1;
    return -1;
}
int bijiao(double x, double y)
{
    if (fabs(x - y) < eps)
        return 0;
    if (x > y)
        return 1;
    return -1;
}
struct vec {
    double x, y;
    double p;
    vec(double x, double y)
    {
        this->x = x;
        this->y = y;
    }
    vec() {}
    vec operator*(const vec& i_T) const
    {
        return vec(x * i_T.x, y * i_T.y);
    }
    vec operator*(double u) const
    {
        return vec(x * u, y * u);
    }
    bool operator==(const vec& i_T) const
    {
        return x == i_T.x && y == i_T.y;
    }
    vec operator/(double u) const
    {
        return vec(x / u, y / u);
    }
    vec operator+(const vec& i_T)
    {
        return vec(x + i_T.x, y + i_T.y);
    }
    vec operator-(const vec& i_T)
    {
        return vec(x - i_T.x, y - i_T.y);
    }
    friend bool operator<(vec a, vec b)
    {
        return a.p < b.p;
    }

} p[MAXN];

double chaji(vec A, vec B)
{
    return A.x * B.y - A.y * B.x;
}
double xuanzhuan(vec a, vec b, vec c)
{
    return chaji(b - a, c - a);
}
vec q[MAXN],tp;
int n;
void Graham(int& tail)
{
    int zz = 0;
    for (int i = 0; i < n; i++)
        if (p[i].y < p[zz].y || (p[i].y == p[zz].y && p[zz].x > p[i].x))
            zz = i;
    swap(p[0], p[zz]);

    for (int i = 1; i < n; i++) {
        p[i] = p[i] - p[0];
        p[i].p = atan2(p[i].y, p[i].x);
    }
    p[0].x = p[0].y = 0;
    sort(p + 1, p + n);

    q[0] = p[0];
    tail = 0;
    for (int i = 1; i < n; i++) {
        while (tail>0 && xuanzhuan(q[tail - 1], q[tail], p[i]) < 0)
            tail--;
        q[++tail] = p[i];
    }
}

int main()
{
    //freopen("txt.txt", "w", stdout);
    cin >> n;
    for (int i = 0; i < n; i++)
        cin >> p[i].x >> p[i].y;

    int t = p[0].y, f = 1;
    for (int i = 0; i < n; i++)
        if (t != p[i].y) {
            f = 0;
            break;
        }
    if (!f) {
        int tail;
        Graham(tail);
        cout << (tail+1 == n) << endl;
        /*for (int i = 0; i <= tail; i++)
            cout << q[i].x+tp.x << ' ' << tp.y+q[i].y << endl;*/
    } else
        cout << 1 << endl;
    return 0;
}
