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<iostream>
using namespace std;
#include<cstdio>
#include<cmath>

struct Point{ double x, y; };

Point set_p(double a, double b)
{
    Point p;
    p.x = a; p.y = b;
    return p;
}

struct Vector{ double vx, vy; };

Vector set_v(const Point &p1, const Point &p2)
{
    Vector v;
    v.vx = p2.x - p1.x;
    v.vy = p2.y - p1.y;
    return v;
}

double dot(const Vector &v1, const Vector &v2)
{
    return (v1.vx * v2.vx) + (v1.vy * v2.vy);
}

double cross(const Vector &v1, const Vector &v2)
{
    return (v1.vx * v2.vy) - (v1.vy * v2.vx);
}

double cross0(const Point &P0, const Point &P1)
{
	return (P0.x * P1.y) - (P1.x * P0.y);
}

double onenorm(const Vector &v)
{
    return abs(v.vx) + abs(v.vy);
}

double norm(const Vector &v)
{
	return sqrt(v.vx * v.vx + v.vy * v.vy);
}

int ccw(const Point &P0, const Point &P1, const Point &P2)
{
    Vector V1 = set_v(P0, P1);
    Vector V2 = set_v(P0, P2);
    double c = cross(V1, V2);
    if(c > 0){ return 1; }else if(c < 0){ return -1; }
    if(dot(V1, V2) < 0){ return -2; }
    if(onenorm(V1) < onenorm(V2)){ return 2; }
    return 0;
}

int intersect(const Point &P0, const Point &P1, const Point &P2, const Point &P3)
{
    if(ccw(P0, P1, P2) * ccw(P0, P1, P3) <= 0 && ccw(P2, P3, P0) * ccw(P2, P3, P1) <= 0){
        return 1;
    }else{
        return 0;
    }
}

double dist_seg(const Point &P0, const Point &P1, const Point &P2) // Segment P0P1 & Point P2.
{
    Vector V01 = set_v(P0, P1), V12 = set_v(P1, P2), V02 = set_v(P0, P2);
    if(dot(V01, V12) > 0) return norm(V12);
    if(dot(V01, V02) < 0) return norm(V02);
    double c_sum;
    c_sum = cross0(P0, P1) + cross0(P1, P2) + cross0(P2, P0);
    if(c_sum < 0) c_sum *= -1.0;
    return c_sum / norm(V01);
}

int main()
{
    int i, n;
    double *X, *Y;
    scanf("%d", &n);
    X = new double [n + 2];
    Y = new double [n + 2];
    for(i = 0; i < n; i++){
        scanf("%lf %lf", &X[i], &Y[i]);
    }
    X[n] = X[0], Y[n] = Y[0], X[n + 1] = X[1], Y[n + 1] = Y[1];
    Point *P;
    P = new Point [n + 2];
    for(i = 0; i < n; i++){
        P[i] = set_p(X[i], Y[i]);
    }
    int c;
    for(i = 0; i < n; i++){
        c = ccw(P[i], P[i + 1], P[i + 2]);
        if(c == -1) break;
    }
    if(i < n){ printf("0\n"); }else{ printf("1\n"); }
    delete [] X, delete [] Y, delete [] P;

    return 0;
}