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 <iostream>
#include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstring>
#include <ctime>
#include <iomanip>
#include <map>
#include <queue>
#include <set>
#include <tuple>
using namespace std;
typedef long long ll;
#define _ << " " <<
#define all(X) (X).begin(), (X).end()
#define len(X) (X).size()
#define Pii pair<int, int>
#define Pll pair<ll, ll>
#define Tiii tuple<int, int, int>
#define Tlll tuple<ll, ll, ll>

double eps = 1e-8;

struct point /* vec */ {
    double x, y;
    point operator+(const point &p) {
        return {x + p.x, y + p.y};
    }
    point operator-(const point &p) {
        return {x - p.x, y - p.y};
    }
};

struct line {
    // ax + by + c = 0
    double a, b, c;
};

struct circle {
    point p;
    double r;
};

double dot(point P, point Q) {
    return P.x*Q.x + P.y*Q.y;
}

double cross_2d(point P, point Q) {
    return P.x*Q.y - P.y*Q.x;
}

double points_distance(point A, point B, int deg) {
    point C = B - A;
    return pow(C.x*C.x + C.y*C.y, 0.5 * deg);
}

line line_2points(point P, point Q) {
    return {P.y - Q.y, Q.x - P.x, P.x*Q.y - P.y*Q.x};
}

point lines_intersection(line l, line m) {
    if (abs(l.a*m.b - l.b*m.a) < eps) {
        assert(-1);
    }
    return {- (l.b*m.c - l.c*m.b) / (l.b*m.a - l.a*m.b),
            - (l.a*m.c - l.c*m.a) / (l.a*m.b - l.b*m.a)};
}

bool line_same(line l, line m) {
    if (l.c * m.c == 0) {
        if (l.c == m.c) {
            if (l.b * m.b == 0) {
                if (l.b == m.b) return 1;
                else return 0;
            }
            else return l.a / l.b == m.a / m.b; 
        }
        else return 0;
    }
    else return l.a / l.c == m.a / m.c && l.b / l.c == m.b / m.c;
}

bool on_line(point P, point Q, point R) {
    if (P.x > Q.x) swap(P, Q);
    if (P.y > Q.y) swap(P.y, Q.y);
    return (P.x <= R.x && R.x <= Q.x && P.y <= R.y && R.y <= Q.y);
}

double point_line_distance(point P, line l) {
    return abs(l.a * P.x + l.b * P.y + l.c) / sqrt(l.a*l.a + l.b*l.b);
}

double point_segment_distance(point p1, point p2, point q) {
    if (dot(q - p1, p2 - p1) <= 0) return points_distance(p1, q, 1);
    else if (dot(q - p2, p1 - p2) <= 0) return points_distance(p2, q, 1);
    else return point_line_distance(q, line_2points(p1, p2));
}

double is_segments_intersect(point p1, point p2, point q1, point q2) {
    line s0 = line_2points(p1, p2);
    line s1 = line_2points(q1, q2);
    if (abs(s0.a*s1.b - s0.b*s1.a) < eps) {
        if (p1.x > p2.x) swap(p1, p2);
        if (p1.y > p2.y) swap(p1.y, p2.y);
        if (q1.x > q2.x) swap(q1, q2);
        if (q1.y > q2.y) swap(q1.y, q2.y);
        if (line_same(s0, s1)) {
            return (q1.x <= p2.x && p1.x <= q2.x && q1.y <= p2.y && p1.y <= q2.y);
        }
        else return 0;
    }
    return cross_2d(p2 - p1, q1 - p1) * cross_2d(p2 - p1, q2 - p1) < eps
        && cross_2d(q2 - q1, p1 - q1) * cross_2d(q2 - q1, p2 - q1) < eps;
}

vector<point> circles_intersection(circle A, circle B) {
    vector<point> ret;
    point X = A.p;
    B.p = B.p - A.p;
    A.p = {0, 0};

    if (points_distance(A.p, B.p, 2) - pow(A.r + B.r, 2) > eps) return ret;

    double K = (B.p.x*B.p.x + B.p.y*B.p.y + A.r*A.r - B.r*B.r) / 2;
    double SQ = (B.p.x*B.p.x + B.p.y*B.p.y)*A.r*A.r - K * K;
    double DS = points_distance(A.p, B.p, 2);
    //cerr << K _ SQ _ DS << endl;
    if (abs(SQ) < eps) {
        ret.push_back({K*B.p.x / DS + X.x, K*B.p.y / DS + X.y});
        return ret;
    }
    ret.push_back({(K*B.p.x + B.p.y*sqrt(SQ)) / DS + X.x,
                   (K*B.p.y - B.p.x*sqrt(SQ)) / DS + X.y});
    ret.push_back({(K*B.p.x - B.p.y*sqrt(SQ)) / DS + X.x,
                   (K*B.p.y + B.p.x*sqrt(SQ)) / DS + X.y});
    return ret;
}
 
int main() {
    int n;
    cin >> n;

    point p[n];
    for (int i = 0; i < n; i++) cin >> p[i].x >> p[i].y;
    for (int i = 0; i < n; i++) {
        if (cross_2d(p[(i + 1) % n] - p[i], p[(i + 2) % n] - p[(i + 1) % n]) < 0) {
            cout << 0 << endl;
            return 0;
        }
    }
    cout << 1 << endl;
}
