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 <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <deque>
#include <queue>
using namespace std;
#define rep(i,a,n) for(int i=(a);i<(n);i++)
#define per(i,a,n) for(int i=(n)-1;i>=(a);i--)
#define mp make_pair
#define pb push_back

typedef double db;

const db EPS = 1e-8;

inline int sign(db a) {
    return a < -EPS ? -1 : a > EPS;
}

inline int cmp(db a, db b){//?????????????????°
    return sign(a-b);
}

struct P {//???
    db x, y;
    P() {}
    P(db _x, db _y) : x(_x), y(_y) {}
    P operator+(P p) { return P(x + p.x, y + p.y); }
    P operator-(P p) { return P(x - p.x, y - p.y); }
    P operator*(db d) { return P(x * d, y * d); }
    P operator/(db d) { return P(x / d, y / d); }
    bool operator<(P p) const {
        int c = cmp(x, p.x);
        if (c) return c == -1;
        return cmp(y, p.y) == -1;
    }
    db dot(P p) { return x * p.x + y * p.y; }//????§?
    db det(P p) { return x * p.y - y * p.x; }//????§?
    db distTo(P p) { return (*this-p).abs(); }//??????
    db alpha() { return atan2(y, x); }//?±?????§?
    void read() { cin>>x>>y; }//?????\
    db abs() { return sqrt(abs2());}//??????
    db abs2() { return x * x + y * y; }//???????????????
    P rot90() { return P(-y,x);}//?????¶????????¬90???
    P unit() { return *this/abs(); }//?????????
    int quad() const { return sign(y) == 1 || (sign(y) == 0 && sign(x) >= 0); }//????§?????????¨[0,180)?????´
};

struct L{ //ps[0] -> ps[1]
    P ps[2];
    P& operator[](int i) { return ps[i]; }
    P dir() { return ps[1] - ps[0]; }//??´??????????????????
    bool include(P p) { return sign((ps[1] - ps[0]).det(p - ps[0])) > 0; }//????????¨?????????????????¢????????¶????????¨???
    L push(){ // push eps outward
        const double eps = 1e-6;
        P delta = (ps[1] - ps[0]).rot90().unit() * eps;
        return {ps[0] - delta, ps[1] - delta};
    }
};

#define cross(p1,p2,p3) ((p2.x-p1.x)*(p3.y-p1.y)-(p3.x-p1.x)*(p2.y-p1.y))
#define crossOp(p1,p2,p3) sign(cross(p1,p2,p3))

P isLL(P p1, P p2, P q1, P q2) {//?±??????´?????????
    db a1 = cross(q1, q2, p1), a2 = -cross(q1, q2, p2);
    return (p1 * a2 + p2 * a1) / (a1 + a2);
}

P isLL(L l1,L l2){ return isLL(l1[0],l1[1],l2[0],l2[1]); }//?±??????´?????????

bool intersect(db l1,db r1,db l2,db r2){
    if(l1>r1) swap(l1,r1); if(l2>r2) swap(l2,r2);
    return !( cmp(r1,l2) == -1 || cmp(r2,l1) == -1 );
}

bool isSS(P p1, P p2, P q1, P q2){//?±???????????????????  ?????¬????§??????????
    return intersect(p1.x,p2.x,q1.x,q2.x) && intersect(p1.y,p2.y,q1.y,q2.y) &&
           crossOp(p1,p2,q1) * crossOp(p1,p2,q2) <= 0 && crossOp(q1,q2,p1)
                                                         * crossOp(q1,q2,p2) <= 0;
}

bool isMiddle(db a, db m, db b) {//??????m????????¨a,b?????´
    return sign(a - m) == 0 || sign(b - m) == 0 || (a < m != b < m);
}

bool isMiddle(P a, P m, P b) {//?????????m?????????????????¨a,b?????´
    return isMiddle(a.x, m.x, b.x) && isMiddle(a.y, m.y, b.y);
}

bool onSeg(P p1, P p2, P q){//?????????????????¨??´??????
    return crossOp(p1,p2,q) == 0 && isMiddle(p1, q, p2);
}

P proj(P p1, P p2, P q) {//????????´???????????±
    P dir = p2 - p1;
    return p1 + dir * (dir.dot(q - p1) / dir.abs2());
}

P reflect(P p1, P p2, P q){//????????´??????????§°
    return proj(p1,p2,q) * 2 - q;
}

db nearest(P p1,P p2,P q){
    P h = proj(p1,p2,q);
    if(isMiddle(p1,h,p2))
        return q.distTo(h);
    return min(p1.distTo(q),p2.distTo(q));
}

db disSS(P p1, P p2, P q1, P q2){
    if(isSS(p1,p2,q1,q2)) return 0;
    return min(min(nearest(p1,p2,q1),nearest(p1,p2,q2)), min(nearest(q1,q2,p1),nearest(q1,q2,p2)) );
}

db disSS(L l1,L l2){
    return disSS(l1[0],l1[1],l2[0],l2[1]);
}

db rad(P p1,P p2){
    return atan2l(p1.det(p2),p1.dot(p2));
}

db incircle(P p1, P p2, P p3){
    db A = p1.distTo(p2);
    db B = p2.distTo(p3);
    db C = p3.distTo(p1);
    return sqrtl(A*B*C/(A+B+C));
}

db area(vector<P> ps){
    db ret = 0; rep(i,0,ps.size()) ret += ps[i].det(ps[(i+1)%ps.size()]);
    return abs(ret/2);
}




int main(){
    int n;
    cin >> n;
    vector<P> ps;
    for(int i = 1;i <= n;i++){
        P p;
        p.read();
        ps.push_back(p);
    }
    vector<db> Det;
    for(int i = 0;i < n;i++){
        db tmp = (ps[(i + 2) % n] - ps[(i + 1) % n]).det(ps[(i + 1) % n] - ps[i]);
        Det.push_back(tmp);
    }
    bool flag = true;
    for(int i = 0;i < n;i++){
        if(sign(Det[i]) != sign(Det[(i + 1) % n])) flag = false;
    }
    if(flag) printf("1\n");
    else printf("0\n");
    return 0;
}