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;
typedef long long ll;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define Vector Point
#define INF 2000000000
#define DOUBLE_INF 1e50
#define sq(x) ((x)*(x))
#define fi first
#define sec second
#define all(x) (x).begin(),(x).end()
#define EQ(a,b) (abs((a)-(b))<eps)

// Geometry Library
// written by okuraofvegetable

inline double add(double a,double b){
	if(abs(a+b)<eps*(abs(a)+abs(b)))return 0;
	return a+b;
}

struct Point{
	double x,y;
	Point() {}
	Point(double x,double y) : x(x),y(y){}
	Point operator + (Point p){return Point(add(x,p.x),add(y,p.y));}
	Point operator - (Point p){return Point(add(x,-p.x),add(y,-p.y));}
	Point operator * (double d){return Point(x*d,y*d);}
	double dot(Point p){return add(x*p.x,y*p.y);}
	double det(Point p){return add(x*p.y,-y*p.x);}
	double norm(){return sqrt(x*x+y*y);}
	double norm2(){return x*x+y*y;}
	double dist(Point p){return ((*this)-p).norm();}
	double dist2(Point p){return sq(x-p.x)+sq(y-p.y);}
	Point vert(){return Point(y,-x);}
	void dump(const char* msg=""){printf("%s%.12f %.12f\n",msg,x,y);return;}
	
	// following functions for vector operation

	// signed area of triange (0,0) (x,y) (p.x,p.y)
	double area(Point p){
		return (x*p.y-p.x*y)/2.0;
	}
};
// direction a -> b -> c
// verified AOJ CGL_1_C
int ccw(Point a,Point b,Point c){
	Vector p = b-a;
	Vector q = c-a;
	if(p.det(q)>0.0)return 1; // counter clockwise
	if(p.det(q)<0.0)return -1; // clockwise
	if(p.dot(q)<0.0)return 2; // c--a--b online_back
	if(p.norm()<q.norm())return 3; // a--b--c online_front 
	return 4;// a--c--b on_segment
}
struct Line{
	Point a,b;
	Line(){}
	Line(Point a,Point b):a(a),b(b){}
	bool on(Point q){
		return (a-q).det(b-q)==0; 
	}
	// folloing 2 functions verified AOJ CGL_2_A
	bool is_parallel(Line l){return (a-b).det(l.a-l.b)==0;}
	bool is_orthogonal(Line l){return (a-b).dot(l.a-l.b)==0;}
	Point intersection(Line l){
		//assert(!is_parallel(l));
		return a+(b-a)*((l.b-l.a).det(l.a-a)/(l.b-l.a).det(b-a));
	}
	// projection of p to this line
	// verified AOJ CGL_1_A
	Point projection(Point p){
		return (b-a)*((b-a).dot(p-a)/(b-a).norm2())+a;
	}
	// reflection point of p onto this line
	// verified AOJ CGL_1_B
	Point refl(Point p){
		Point proj = projection(p);
		return p+((proj-p)*2.0);
	}
};
struct Segment{
	Point a,b;
	Segment(){}
	Segment(Point a,Point b):a(a),b(b){}
	Line line(){
		return Line(a,b);
	}
	bool on(Point q){
		return ((a-q).det(b-q)==0&&(a-q).dot(b-q)<=0); 
	}
	// verified AOJ CGL_2_B
	bool is_intersect(Segment s){
		if(line().is_parallel(s.line())){
			if(on(s.a)||on(s.b))return true;
			if(s.on(a)||s.on(b))return true;
			return false;
		}
		Point p = line().intersection(s.line());
		if(on(p)&&s.on(p))return true;
		else return false;
	}
	bool is_intersect(Line l){
		if(line().is_parallel(l)){
			if(l.on(a)||l.on(b))return true;
			else return false;
		}
		Point p = line().intersection(l);
		if(on(p))return true;
		else return false;
	}
	// following 2 distance functions verified AOJ CGL_2_D
	double distance(Point p){
		double res = DOUBLE_INF;
		Point q = line().projection(p);
		if(on(q))res = min(res,p.dist(q));
		res = min(res,min(p.dist(a),p.dist(b)));
		return res;
	}
	double distance(Segment s){
		if(is_intersect(s))return 0.0;
		double res = DOUBLE_INF;
		res = min(res,s.distance(a));
		res = min(res,s.distance(b));
		res = min(res,this->distance(s.a));
		res = min(res,this->distance(s.b));
		return res;
	}
};

typedef vector<Point> Polygon;
// verified AOJ CGL_3_A
double area(Polygon& pol){
	vector<Point> vec;
	double res = 0.0;
	int M = pol.size();
	for(int i=0;i<M;i++){
		res += (pol[i]-pol[0]).area(pol[(i+1)%M]-pol[0]);	
	}
	return res;
}
// for input
Point input_point(){
	Point p;
	cin >> p.x >> p.y;
	return p;
}
Segment input_segment(){
	Point a,b;
	a = input_point();
	b = input_point();
	return Segment(a,b);
}
Line input_line(){
	Point a,b;
	a = input_point();
	b = input_point();
	return Line(a,b);
}

int main(){
	int n;
	cin >> n;
	Polygon pol;
	for(int i=0;i<n;i++){
		pol.pb(input_point());
	}
	for(int i=0;i<n-1;i++){
		if(ccw(pol[i],pol[i+1],pol[(i+2)%n])==-1){
			cout << 0 << endl;
			return 0;
		}
	}
	cout << 1 << endl;
	return 0;
}
