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>

namespace LCY{
	#define double long double
	const double EPS=1e-10;
	inline int dcmp(double x){if(fabs(x)<EPS)return 0;return (x<0)?-1:1;}
	struct Point{double x,y;Point(double _x=0,double _y=0){x=_x;y=_y;}};
	struct Vector{double x,y;Vector(double _x=0,double _y=0){x=_x;y=_y;}};
	
	Vector operator - (Point a,Point b){return Vector(a.x-b.x,a.y-b.y);}
	Vector operator * (Vector a,double d){return Vector(a.x*d,a.y*d);}
	Point operator + (Point a,Vector b){return Point(a.x+b.x,a.y+b.y);}
	
	inline double dot(Vector a,Vector b){return a.x*b.x+a.y*b.y;}
	inline double cross(Vector a,Vector b){return a.x*b.y-a.y*b.x;}
	inline double norm(Vector a){return dot(a,a);}
	inline double abs(Vector a){return std::sqrt(norm(a));}
	
	struct Line{
		Point p1,p2;
		Line(Point _p1=Point(0,0),Point _p2=Point(0,0)){p1=_p1;p2=_p2;}
	};
	inline bool is_parallel(Line l1,Line l2){return dcmp(cross(l2.p2-l2.p1,l1.p2-l1.p1))==0;}
	inline bool is_vertical(Line l1,Line l2){return dcmp(dot(l2.p2-l2.p1,l1.p2-l1.p1))==0;}
	
	Point project(Line l,Point p){
		Vector base=l.p2-l.p1;
		double r=dot(p-l.p1,base)/norm(base);
		return l.p1+base*r;
	}
	Point reflect(Line l,Point p){
		Point q=project(l,p);
		Vector v=p-q;v.x=-v.x;v.y=-v.y;
		return q+v;
	}
	int ccw(Vector v1,Vector v2){
		if(dcmp(cross(v1,v2))>0)return 1;//COUNTER_CLOCKWISE
		else if(dcmp(cross(v1,v2))<0)return 2;//CLOCKWISE
		else{
			if(dcmp(dot(v1,v2))<0)return 3;//ONLINE_BACK
			else{
				if(dcmp(norm(v1)-norm(v2))<0)return 4;//ONLINE_FRONT
				else return 5;//ON_SEGMENT
			}
		}
	}
	inline bool is_inter(Line l1,Line l2){
		bool flag=1;
		int t1=ccw(l1.p2-l1.p1,l2.p1-l1.p1),t2=ccw(l1.p2-l1.p1,l2.p2-l1.p1);
		if(t1==5 || t2==5) return true;
		else if(t1==t2)return false;
		else if(t1>=3 && t2<=2) return false;
		else if(t1<=2 && t2>=3) return false;
		std::swap(l1,l2);
		t1=ccw(l1.p2-l1.p1,l2.p1-l1.p1),t2=ccw(l1.p2-l1.p1,l2.p2-l1.p1);
		if(t1==5 || t2==5) return true;
		else if(t1==t2)return false;
		else if(t1>=3 && t2<=2) return false;
		else if(t1<=2 && t2>=3) return false;
		return true;
	}
	inline Point line_intersection(Line l1,Line l2){
		if(is_parallel(l1,l2)) return Point(233,233);
		Vector u=l1.p1-l2.p1,v=l1.p2-l1.p1,w=l2.p2-l2.p1;
		double t=cross(w,u)/cross(v,w);
		return l1.p1+v*t;
	}
	inline Point segment_intersection(Line l1,Line l2){
		if(!is_inter(l1,l2)) return Point(233,233);
		return line_intersection(l1,l2);
	}
	inline double line_point_distance(Line l,Point p){
		return std::abs(cross(l.p2-l.p1,p-l.p1))/abs(l.p2-l.p1);
	}
	inline double segment_point_distance(Line l,Point p){
		if(dcmp(dot(l.p2-l.p1,p-l.p1))<0) return abs(p-l.p1);
		if(dcmp(dot(l.p1-l.p2,p-l.p2))<0) return abs(p-l.p2);
		return line_point_distance(l,p);
	}
	inline double segment_distance(Line l1,Line l2){
		#define spd segment_point_distance
		if(is_inter(l1,l2))return 0.0;
		return std::min(std::min(spd(l1,l2.p1),spd(l1,l2.p2)),std::min(spd(l2,l1.p1),spd(l2,l1.p2)));
	}
	double area(std::vector<Point> &Q){
		int n=Q.size();
		double ans=0;
		Point o=Point(0.0,0.0);
		for(int i=0;i<n;++i)ans+=cross(Q[i]-o,Q[(i+1)%n]-o)/2.0;
		return ans;
	}
	bool is_convex(std::vector<Point> &Q){
		int n=Q.size();
		Point o=Point(0.0,0.0);
		for(int i=0;i<n;++i){
			Point lst=Q[(i+n-1)%n],now=Q[i],nxt=Q[(i+1)%n];
			if(ccw(now-lst,nxt-lst)==2)return false;
		}
		return true;
	}
}
using namespace LCY;
using namespace std;
int main(){
	vector<Point>Q;int n;cin>>n;for(int i=0;i<n;++i){Point p;cin>>p.x>>p.y;Q.push_back(p);}
	cout<<is_convex(Q)<<endl;
	return 0;
}
