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>

#define _overload(_1,_2,_3,name,...) name
#define _rep(i,n) _range(i,0,n)
#define _range(i,a,b) for(int i=int(a);i<int(b);++i)
#define rep(...) _overload(__VA_ARGS__,_range,_rep,)(__VA_ARGS__)

#define _rrep(i,n) _rrange(i,n,0)
#define _rrange(i,a,b) for(int i=int(a)-1;i>=int(b);--i)
#define rrep(...) _overload(__VA_ARGS__,_rrange,_rrep,)(__VA_ARGS__)

#define _all(arg) begin(arg),end(arg)
#define uniq(arg) sort(_all(arg)),(arg).erase(unique(_all(arg)),end(arg))
#define getidx(ary,key) lower_bound(_all(ary),key)-begin(ary)
#define clr(a,b) memset((a),(b),sizeof(a))
#define bit(n) (1LL<<(n))
#define popcount(n) (__builtin_popcountll(n))

using namespace std;

template<class T>bool chmax(T &a, const T &b) { return (a<b)?(a=b,1):0;}
template<class T>bool chmin(T &a, const T &b) { return (b<a)?(a=b,1):0;}

using ll=long long;
using R=long double;
const R EPS=1e-9L; // [-1000,1000]->EPS=1e-8 [-10000,10000]->EPS=1e-7
inline int sgn(const R& r){return(r > EPS)-(r < -EPS);}
inline R sq(R x){return sqrt(max(x,0.0L));}

const int dx[8]={1,0,-1,0,1,-1,-1,1};
const int dy[8]={0,1,0,-1,1,1,-1,-1};

// Problem Specific Parameter:

// Description: ????????????
// Verifyed: various problem 
const R INF = 1E40L;
const R PI = acos(-1.0L);
using P=complex<R>;
const P O=0.0L;
using L=struct{P s,t;};
using VP=vector<P>;
using C=struct{P p;R c;};

istream& operator >> (istream& is,P& p){ R x,y;is >> x >> y; p=P(x,y); return is;}
ostream& operator << (ostream& os,P& p){ os << real(p) << " " << imag(p); return os;}

inline R dot(P o,P a,P b){return real(conj(a-o)*(b-o));}
inline R det(P o,P a,P b){return imag(conj(a-o)*(b-o));}
inline int sdot(P o,P a,P b){return sgn(dot(o,a,b));}
inline int sdet(P o,P a,P b){return sgn(det(o,a,b));}

//projection verify AOJ CGL_1_A
P proj(L l,P p){ R u=real((p-l.s)/(l.t-l.s)); return (1-u)*l.s+u*l.t;}

// vertical parallel
// verified: AOJ CGL_2_A
bool vertical(L a,L b) {return sdot(O,a.t-a.s,b.t-b.s)==0;}
bool parallel(L a,L b) {return sdet(O,a.t-a.s,b.t-b.s)==0;}
bool eql(L a,L b){ return parallel(a,b) and sdet(a.s,a.t,b.s)==0;}

// crossing determination
// verified: AOJ CGL_2_B 
bool iss(L a,L b){
	int sa=sdet(a.s,a.t,b.s)*sdet(a.s,a.t,b.t);
	int sb=sdet(b.s,b.t,a.s)*sdet(b.s,b.t,a.t);
	return max(sa,sb)<0;
}

// crossing point 
// verified: AOJ CGL_2_C
P cross(L a,L b){
	R u=det(a.s,b.s,b.t)/det(O,a.t-a.s,b.t-b.s);
	return (1-u)*a.s+u*a.t;
}
	
// distance 
// verified: AOJ CGL_2_D
R dsp(L l,P p){
	P h=proj(l,p);
	if(sdot(l.s,l.t,p)<=0) h=l.s;
	if(sdot(l.t,l.s,p)<=0) h=l.t;
	return abs(p-h);
}

R dss(L a,L b){return iss(a,b)?0:min({dsp(a,b.s),dsp(a,b.t),dsp(b,a.s),dsp(b,a.t)});}

// Polygon

// area 
// verified: AOJ 1100 CGL_3_A
R area(const VP& pol){
	int n=pol.size();
	R sum=0.0;
	rep(i,n) sum+=det(O,pol[i],pol[(i+1)%n]);
	return abs(sum/2.0L);
}


// convex_polygon determination
// verified: CGL_3_B
bool is_convex(const VP& pol){
	int n=pol.size();
	rep(i,n)if(sdet(pol[i],pol[(i+1)%n],pol[(i+2)%n])<0) return false;
	return true;
}

/*
// polygon realation determination  in  2 on 1 out 0???(possible non-convex) 
// verified: AOJ CGL_3-C
int in_polygon(const VP& pol, const P& p){
	int n=pol.size(),res=0;
	rep(i,n){
		P a=pol[i],b=pol[(i+1)%n];
		if(sdot(p,a,b)<0) return 1;
		bool f=sgn(imag(p-a))>=0,s=sgn(imag(p-b))<0;
		if(sgn(imag(b-a))*sdet(a,b,p)==1 and f==s) res+=(2*f-1);
	}
	return res?2:0;
}

// polygon realation determination???(possible non-convex) 
// verified: AOJ 2514
bool in_polygon(const VP& pol, const L& l){
	VP check{l.s,l.t};
	int n=pol.size();
	rep(i,n){
		L edge={pol[i],pol[(i+1)%n]};
		if(iss(l,edge)) check.emplace_back(cross(l,edge));
	}
	sort(begin(check),end(check),[](P a,P b)->bool{return sgn(real(a)-real(b))?:sgn(imag(a)-imag(b));});
	n=check.size();
	rep(i,n-1){
		P m=(check[i]+check[i+1])/2.0L;
		if(in_polygon(pol,m)==false) return false;
	}
	return true;
}

// convex_cut 
// verified: AOJ CGL_4_C
VP convex_cut(const VP& pol,const L& l) {
	VP res;
	int n=pol.size();
	rep(i,n){
		P a = pol[i],b=pol[(i+1)%n];
		int da=sdet(l.s,l.t,a),db=sdet(l.s,l.t,b);
		if(da>=0) res.emplace_back(a);
		if(da*db<0) res.emplace_back(cross({a,b},l));
	}
	return res;
}
*/

int main(void){
	int n;
	cin >> n;
	VP pol;
	rep(i,n){
		P p;
		cin >> p;
		pol.push_back(p); 
	}
	cout << is_convex(pol) << endl;
	return 0;
}