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
//
//  main.cpp
//  Computational_Geometry
//
//  Created by ?????£??? on 2017/8/2.
//  Copyright ?? 2017??´ ?????£???. All rights reserved.
//

#include <iostream>
#include <cstdio>
#include <cmath>
#include <memory>
#include <string>
#include <cstring>
#include <algorithm>
using namespace std;
const double eps = 1e-8;
const double PI = acos(-1.0);
const int MAX=1e1;

int sgn(double x)
{
    if (fabs(x)<eps) return 0;
    if (x<0) return -1;
    else return 1;
}

struct Point
{
    double x,y;
    Point(){}
    Point(double _x,double _y){
        x=_x;y=_y;
    }
    Point operator -(const Point &b)const{
        return Point(x-b.x,y-b.y);
    }
    double operator ^(const Point &b)const{
        return x*b.y - y*b.x;
    }
    double operator *(const Point &b)const{
        return x*b.x - y*b.y;
    }
    void transXY(double B){
        double tx=x,ty=y;
        x=tx*cos(B) - ty*sin(B);
        y=tx*sin(B) + ty*cos(B);
    }
};

double CalcArea(Point p[],int n)
{
    double res=0;
    for (int i=0; i<n; i++) {
        res+=(p[i]^p[(i+1)%n])/2;
    }
    return fabs(res);
}

bool isconvex(Point poly[],int n)
{
    bool s[3];
    memset(s, false, sizeof(s));
    for (int i=0; i<n; i++) {
        s[sgn((poly[(i+1)%n]-poly[i])^(poly[(i+2)%n]-poly[i]))+1]=true;
        if (s[0] && s[2]) return false;
    }
    return true;
}
Point p[MAX];
int main(void) {
    //freopen("/Users/mac/Desktop/C++?¨????/Computational_Geometry/Computational_Geometry/test.txt", "r", stdin);
    int n;
    scanf("%d\n",&n);
    for (int i=0; i<n; i++) {
        scanf("%lf%lf\n",&p[i].x,&p[i].y);
    }
    printf("%d\n",isconvex(p, n)?1:0);
    return 0;
}