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<bits/stdc++.h>
using namespace std;
#define EPS 1e-10
#define equals(a,b) (fabs( (a) - (b) )< EPS )
// c++ 11,14
typedef struct point{
	double x,y;
	point(){};
	point(double x ,double y):x(x),y(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 * (point &p){ return point(x*p.x-y*p.y,x*p.y+y*p.x) ;}
	point operator * (double a){ return point(x*a,y*a);	}
	point operator / (double a){ return point(x/a,y/a);	}
	
	double abs() { return sqrt(norm()); }
	double norm() { return x*x+y*y; }
	
	bool operator < (const point &p) const { return x!=p.x ? x<p.x : y<p.y; }
	bool operator == (const point &p) const { return fabs(x-p.x)<EPS && fabs(y-p.y)<EPS; }
}point;
double abs(point a){return a.abs();}
double norm(point a){return a.norm();}

typedef complex<double> C;
typedef struct { point s,e;} line;

C convert(point a){ return C(a.x,a.y); }
point convert( C a){ return point(a.real(),a.imag() );}
double dot(point a,point b){ return a.x*b.x+a.y*b.y ; } //内積　a・b
double cross(point a,point b){ return a.x*b.y - a.y*b.x ; }//外積(z成分)　a×b
point vec(line l){return l.e-l.s;}
line make(point s,point e){
	line res; res.s=s; res.e=e;
	return res;
}
point make(){ 
	double x,y; cin>>x>>y;
       	return point(x,y);
}
//直交
bool isorthogonal(point a,point b){ return equals(dot(a,b), 0.0); }
bool isorthogonal(line l1,line l2){ return isorthogonal(vec(l1),vec(l2)); }
//平行
bool isparallel(point a,point b){ return equals(cross(a,b),0.0); }
bool isparallel(line l1,line l2){ return isparallel(vec(l1),vec(l2)); }
//射影
point project(line s,point p){
	point base = vec(s);
	double r=dot(p-s.s,base)/base.norm();
	base = base*r;
	return s.s+base;
}
//反射
point reflect(line l,point p){
	point tmp=project(l,p)-p;
	tmp= tmp*2.0;
	return p+tmp;

}
//交差判定

int ccw(point p0,point p1,point p2){
	point a = p1-p0;
	point b = p2-p0;
if(cross(a,b)>EPS) return 1;//counter_clockwise
if(cross(a,b)<-EPS) return -1;//clockwise
if(dot(a,b)<-EPS)return 2;//online_back
if(a.norm()<b.norm() ) return -2;//online_front
return 0;//on_segment
}
// line p1-p2 line p3-p4
bool intersect(point p1,point p2,point p3,point p4){
	return (ccw(p1,p2,p3)*ccw(p1,p2,p4)<=0 && ccw(p3,p4,p1)*ccw(p3,p4,p2)<=0 ); 
}
// line l1,l2
bool intersect(line l1,line l2){ return intersect(l1.s,l1.e,l2.s,l2.e); }


//距離
//point-point
double distance(point a,point b){ return abs(a-b); }
//point-line(直線）
double distance2(line l,point p){
	return abs(cross(vec(l),p-l.s)/abs(l.e-l.s));
}
//point-line(線分)
double distance(line l,point p){
	if( dot(vec(l),p-l.s) <0.0 ) return abs(p-l.s);
	if( dot(l.s-l.e,p-l.e) <0.0 ) return abs(p-l.e);
	return distance2(l,p);
}
//line-line
double distance(line l1,line l2){
	if(intersect(l1,l2))	return 0.0;
	return min(min(distance(l1,l2.s),distance(l1,l2.e) ), min(distance(l2,l1.s),distance(l2,l1.e) ) );
}

//交点
point crosspoint(line l1,line l2){
	point base = vec(l2);
	double d1 = abs(cross(base,l1.s-l2.s) );
	double d2 = abs(cross(base,l1.e-l2.s) );
	double t = d1/(d1+d2);
	point tmp = vec(l1)*t;
	return l1.s+tmp;
}

int main(){
	double ans=0;
	int n;
	cin>>n;
	vector<point> p(n);
	for(int i=0;i<n;i++){
	p[i]=make();
	}
	bool flag=true;
	ans=cross(p[2]-p[1],p[1]-p[0]);
	//cout<<ans<<endl;
	for(int i=1;i<n-2;i++){
	double tmp=cross(p[i+2]-p[i+1],p[i+1]-p[i]);
	if(ans==0.0)ans=tmp;
	//cout<<tmp<<endl;
	if(ans*tmp<0){
	cout<<0<<endl;
	flag=false;
	break;
	}
	}
	double tmp=cross(p[0]-p[n-1],p[n-1]-p[n-2]);
	//cout<<tmp<<endl;
	if(flag&&ans*tmp<0){
	cout<<0<<endl;
	flag=false;

	}
	if(flag)cout<<1<<endl;
return 0;
}

