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>
#include <fstream>
#include <typeinfo>
#include <vector>
#include <cmath>
#include <set>
#include <map>
#include <string>
#include <algorithm>
#include <cstdio>
#include <queue>
#include <iomanip>
#include <cctype>
#define syosu(x) fixed<<setprecision(x)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<double,double> pdd;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef pair<int,P> pip;
typedef vector<pip> vip;
const int inf=1<<25;
const double pi=acos(-1);
const double eps=1e-8;
const vi emp;

struct point{
    double x,y;
    point operator+(point p){
        return point{x+p.x,y+p.y};
    }
    point operator-(point p){
        return point{x-p.x,y-p.y};
    }
    point operator*(double p){
    return point{x*p,y*p};
    }
    point operator/(double p){
        if(!p) return point{0,0}; 
        return point{x/p,y/p};
    }
    bool operator==(point p){
        return fabs(x-p.x)<eps&&fabs(y-p.y)<eps;
    }
};
 
typedef pair<point,point> pp;
typedef vector<point> VP;
const point O{0,0};
 
class Geom{
    public:
    double Length(point x,point y){
        point z=y-x;
        return sqrt(z.x*z.x+z.y*z.y);
    }
    double IP(point p,point q){
        return p.x*q.x+p.y*q.y;
    }
    double CP(point p,point q){
        return p.x*q.y-q.x*p.y;
    }
    string Counter_Clockwise(pp a,point x){
        point A=a.second-a.first;
        point X=x-a.first;
        double ip=IP(A,X),cp=CP(A,X),Al=Length(O,A),Xl=Length(O,X);
        if(cp>eps) return "Counter_Clockwise";
        if(cp<-eps) return "Clockwise";
        if(ip<-eps) return "Online_Back";
        if(Xl<Al||fabs(Xl-Al)<eps) return "On_Segment";
        return "Online_Front";
    }
	double Heron(point A,point B,point C){
		double a=Length(B,C),b=Length(C,A),c=Length(A,B),s=(a+b+c)/2;
		return sqrt(s*(s-a)*(s-b)*(s-c));
	}
	double Area(VP p){
		double sum;
		string s;
		p.push_back(p[0]);
		for(VP::iterator i=p.begin()+1;i!=p.end();i++){
			s=Counter_Clockwise(pp(O,*(i-1)),*i);
			if(s[1]=='o') sum+=Heron(O,*(i-1),*i);
			else if(s[1]=='l') sum-=Heron(O,*(i-1),*i);
		}
		return sum;
	}
	string Convex_Concave(VP p){
		p.push_back(p[0]);
		string s;
		for(VP::iterator i=p.begin()+1;i!=p.end()-1;i++){
			s=Counter_Clockwise(pp(*(i-1),*i),*(i+1));
			if(s[1]=='l') return "Concave";
		}
		return "Convex";
	}
    void Point_in(point& p){
        cin>>p.x>>p.y;
    }
};

int N;
VP p;

int main(){
	cout<<syosu(1);
	Geom geo;
	cin>>N;
	p=VP(N);
	for(VP::iterator i=p.begin();i!=p.end();i++) geo.Point_in(*i);
	string s=geo.Convex_Concave(p);
	if(s=="Convex") cout<<1<<endl;
	else cout<<0<<endl;
}