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 <cmath>
#include <cstdlib>
#include <iostream>
#include <bitset>
#include <deque>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <algorithm>
#include <iterator>
#include <string>
#include <chrono>
#include <random>
#include <tuple>
#include <utility>
#include <fstream>
#include <complex>

const long INF = (1l << 30);
const long LINF = (1l << 60);

//geometric library
//#include <complex>
typedef std::complex<double> Com;

//内積
double dot_product(const Com a, const Com b){
	return (conj(a)*b).real();
}

//外積
double cross_product(const Com a, const Com b){
	return (conj(a)*b).imag();
}

//点と直線の距離
double dist_dot_line(const Com st, const Com en, const Com dt){
    return std::abs(cross_product(dt-st, en-st) / std::abs(en-st));
}

//点と線分の距離
double dist_dot_seg(const Com st, const Com en, const Com dt){
	if(dot_product(en-st, dt-st) <= 0){
		return std::abs(dt-st);
	}else if(dot_product(st-en, dt-en) <= 0){
		return std::abs(dt-en);
	}else{
		return dist_dot_line(st, en, dt);
	}
}

//線分の交差判定
//平行・接触は含まない(接触を含みたいときはdist_seg==0を使う)
bool seg_crossing(const Com st1, const Com en1, const Com st2, const Com en2){
	double cross1 = cross_product(en1-st1, st2-st1) * cross_product(en1-st1, en2-st1);
	double cross2 = cross_product(en2-st2, st1-st2) * cross_product(en2-st2, en1-st2);
	return (cross1 < 0) && (cross2 < 0);
}

//線分と線分の距離
double dist_seg(const Com st1, const Com en1, const Com st2, const Com en2){
	if(seg_crossing(st1, en1, st2, en2)){
		return 0;
	}
	return std::min(std::min(dist_dot_seg(st1, en1, st2), dist_dot_seg(st1, en1, en2)), std::min(dist_dot_seg(st2, en2, st1), dist_dot_seg(st2, en2, en1)));
}

//線分と線分の垂直判定
bool is_vertical(const Com st1, const Com en1, const Com st2, const Com en2){
    if(dot_product(en1-st1, en2-st2) == 0){
        return true;
    }else{
        return false;
    }
}

//平行判定
bool is_parallel(const Com st1, const Com en1, const Com st2, const Com en2){
    if(cross_product(en1-st1, en2-st2) == 0){
        return true;
    }else{
        return false;
    }
}

//直線・線分の交点
Com cross_point(const Com st1, const Com en1, const Com st2, const Com en2){
    /* 線分の時はコメントを外した方が良さそう
    if(dist_seg(st1, en1, st2, en2) > 0 || is_parallel(st1, en1, st2, en2)){
        printf("Error! cross_point invalid input\n");
        std::exit(EXIT_FAILURE);
    }
    //*/
    double den = (real(st1)-real(en1)) * (imag(en2)-imag(st2)) - (real(en2)-real(st2)) * (imag(st1)-imag(en1));
    double mol = (real(en2)-real(en1)) * (imag(en2)-imag(st2)) - (real(en2)-real(st2)) * (imag(en2)-imag(en1));
    double s = mol/den;
    return st1 * s + en1 * (1-s);
}
long n;
Com p[105];

int main(){
    scanf("%ld", &n);
    for(int i = 0; i < n; i++){
        double x, y;
        scanf("%lf%lf", &x, &y);
        p[i] = Com(x, y);
    }
    p[n] = p[0], p[n+1] = p[1];
    for(int i = 0; i < n; i++){
        if(cross_product(p[i+1]-p[i], p[i+2]-p[i+1]) < 0){
            printf("0\n");
            return 0;
        }
    }
    printf("1\n");
}

