For a given polygon g, print "1" if g is a convex polygon, "0" otherwise. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees.

g is represented by a sequence of points p1, p2,..., pn where line segments connecting pi and pi+1 (1 ≤ i ≤ n-1) are sides of the polygon. The line segment connecting pn and p1 is also a side of the polygon.

Constraints

* 3 ≤ n ≤ 100
* -10000 ≤ xi, yi ≤ 10000
* No point of the polygon will occur more than once.
* Two sides of the polygon can intersect only at a common endpoint.

Input

g is given by coordinates of the points p1,..., pn in the following format:


n
x1 y1
x2 y2
:
xn yn


The first integer n is the number of points. The coordinate of a point pi is given by two integers xi and yi. The coordinates of points are given in the order of counter-clockwise visit of them.

Output

Print "1" or "0" in a line.

Examples

Input

4
0 0
3 1
2 3
0 3


Output

1


Input

5
0 0
2 0
1 1
2 2
0 2


Output

0
#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;
}
