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 <cmath>

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
using namespace std;

typedef double D;
const D EPS = 1e-8;
const D INF = 1e10;
const D PI = M_PI;

struct P {
    D x, y;
    P(D xs, D ys) : x(xs), y(ys) { }
    P() { }
};
P operator +(P a, P b) { return P(a.x + b.x, a.y + b.y); }
P operator -(P a, P b) { return P(a.x - b.x, a.y - b.y); }
P operator *(P p, D s) { return P(p.x * s, p.y * s); }

D inp(P a, P b) { return a.x*b.x + a.y*b.y; }
D outp(P a, P b) { return a.x*b.y - a.y*b.x; }
D norm(P p) { return inp(p, p); }
D abs(P p) { return sqrt(norm(p)); }
bool eq(P a, P b) { return abs(a - b) < EPS; }
D arg(P p) { return atan2(p.y, p.x); }
P rot90(P p) {
    return P(-p.y, p.x);
}
P rot(P p, D radian) {
    P q;
    q.x = cos(radian)*p.x - sin(radian)*p.y;
    q.y = sin(radian)*p.x + cos(radian)*p.y;
    return q;
}
struct L : vector<P> {
    P a, b;
    L(P as, P bs) : a(as), b(bs) { }
};
P projection(L l, P p) { // ??卒???l???????????????p?????????
    P a = l.b - l.a;
    P b = p - l.a;
    D t = inp(b, a) / norm(a);
    return l.a + a * t;
}
P reflection(L l, P p) { // ??卒???l???????????????p???????属?
    return p + (projection(l, p) - p) * 2;
}
int ccw(P a, P b, P c) {
    b = b - a; c = c - a;

    // a - b - c ????????????????????即???
    if(outp(b, c) > EPS)  return +1; // ???????即???????
    if(outp(b, c) < -EPS) return -1; // ????即???????

    // a - b - c ?????卒??????????????其??即???
    if(inp(b, c) < 0)     return +2; // c - a - b
    if(norm(b) < norm(c)) return -2; // a - b - c
    return 0;                        // a - c - b
}
bool iSS(L s, L t) { // ????????????
    return ccw(s.a, s.b, t.a) * ccw(s.a, s.b, t.b) <= 0 &&
        ccw(t.a, t.b, s.a) * ccw(t.a, t.b, s.b) <= 0;
}
bool iSP(L s, P p) {
    return ccw(s.a, s.b, p) == 0;
}
D dSP(L s, P p) {
    P r = projection(s, p);
    if(iSP(s, r)) return abs(r - p);
    return min(abs(s.a - p), abs(s.b - p));
}
D dSS(L s, L t) {
    if(iSS(s, t)) return 0;
    return min(min(dSP(s, t.a), dSP(s, t.b)),
            min(dSP(t, s.a), dSP(t, s.b)));
}
/* ?????????????????即??????iSS(s,t)????蔵???????????????即 */
P cLL(L l, L m) {
    D d = outp(m.b - m.a, l.b - l.a);
    return l.a + (l.b - l.a) * outp(m.b - m.a, m.b - l.a) * (1.0 / d);
}

typedef vector<P> Poly;
P at(const Poly &ps, int i) { return ps[i % ps.size()]; }
D polyArea(const Poly &ps) {
    D res = 0.0;
    for(int i = 0; i < (int)ps.size(); i++) {
        res += outp(at(ps, i), at(ps, i + 1));
    }
    return res / 2.0;
}
struct C {
    P p; D r;
    C(P ps, D rs) : p(ps), r(rs) { }
    C() { }
};

int main() {
    int N; scanf(" %d", &N);
    Poly ps(N);
    for(int i = 0; i < N; i++) {
        scanf(" %lf %lf", &ps[i].x, &ps[i].y);
    }
    int k = 0;
    int f = 1;
    for(int i = 0; i < N; i++) {
        int ks = ccw(at(ps, i), at(ps, i + 1), at(ps, i + 2));
        if(ks == 1 || ks == -1) {
            if(k == 0) k = ks;
            else if(k != ks) f = 0;
        }
    }
    cout << f << endl;
}