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
// Written By NewbieChd
#include <iostream>
#include <iomanip>
#include <cmath>
// #define double long double
using namespace std;

const int maxN = 100003;
const double eps = 1e-8, inf = 1e18;
inline double absolute(double x) { return x >= 0 ? x : -x; }
inline double square(double x) { return x * x; }

struct Vector {
    double x, y;
    Vector() {}
    Vector(double x, double y) : x(x), y(y) {}
    friend Vector operator+(const Vector& a, const Vector& b) { return Vector(a.x + b.x, a.y + b.y); }
    friend Vector operator-(const Vector& a, const Vector& b) { return Vector(a.x - b.x, a.y - b.y); }
    friend Vector operator*(const Vector& a, const double& b) { return Vector(a.x * b, a.y * b); }
    friend Vector operator/(const Vector& a, const double& b) { return Vector(a.x / b, a.y / b); }
    inline double length() { return sqrt(square(x) + square(y)); }
    inline void read() { cin >> x >> y; }
    inline void write() { cout << fixed << setprecision(10) << x << ' ' << y << '\n'; }
};
inline double distance(Vector a, Vector b) { return sqrt(square(b.x - a.x) + square(b.y - a.y)); }
inline double dot(Vector a, Vector b) { return a.x * b.x + a.y * b.y; }
inline double cross(Vector a, Vector b) { return a.x * b.y - a.y * b.x; }

inline Vector project(Vector a, Vector b, Vector c) {
    b = a - b;
    return b * (dot(b, c - a) / (square(b.x) + square(b.y))) + a;
}
inline Vector reflect(Vector a, Vector b, Vector c) {
    a = project(a, b, c);
    return a * 2 - c;
}

inline bool intersect(Vector a, Vector b, Vector c, Vector d) {
    if (max(min(a.x, b.x), min(c.x, d.x)) > min(max(a.x, b.x), max(c.x, d.x)) + eps || 
        max(min(a.y, b.y), min(c.y, d.y)) > min(max(a.y, b.y), max(c.y, d.y)) + eps || 
        cross(a - c, d - c) * cross(d - c, b - c) + eps < 0 || 
        cross(c - a, b - a) * cross(b - a, d - a) + eps < 0)
        return 0;
    return 1;
}

struct Line {
    double A, B, C;
    Line() {}
    Line(double A, double B, double C) : A(A), B(B), C(C) {}
};
inline Line getLine(Vector a, Vector b) { return Line(b.y - a.y, a.x - b.x, a.y * (b.x - a.x) - a.x * (b.y - a.y)); }
inline Vector crossPoint(Line a, Line b) {
    double tmp = a.A * b.B - a.B * b.A;
    return Vector((a.B * b.C - b.B * a.C) / tmp, (b.A * a.C - a.A * b.C) / tmp);
}

inline double PointSegDistance(Vector a, Vector b, Vector c) {
    Vector l = b - a;
    double tmp;
    if ((tmp = dot(c - a, l) / (square(l.x) + square(l.y))) < eps)
        return distance(c, a);
    if (tmp + eps > 1)
        return distance(c, b);
    return distance(c, project(a, b, c));
}
inline double SegSegDistance(Vector a, Vector b, Vector c, Vector d) {
    if (intersect(a, b, c, d))
        return 0;
    return min(min(PointSegDistance(a, b, c), PointSegDistance(a, b, d)),
               min(PointSegDistance(c, d, a), PointSegDistance(c, d, b)));
}

Vector a[maxN];
inline double area(Vector* a, int n) {
    double o = cross(a[n - 1], a[0]);
    for (int i = 1; i < n; ++i)
        o += cross(a[i - 1], a[i]);
    return o / 2;
}

int main() {
    ios::sync_with_stdio(false);
    int n, i;
    cin >> n;
    for (i = 1; i <= n; ++i)
        a[i].read();
    if (cross(a[n] - a[n - 1], a[1] - a[n]) + eps < 0 || 
        cross(a[1] - a[n], a[2] - a[1]) + eps < 0) {
        cout << 0 << '\n';
        return 0;
    }
    for (i = 3; i <= n; ++i)
        if (cross(a[i - 1] - a[i - 2], a[i] - a[i - 1]) + eps < 0) {
            cout << 0 << '\n';
            return 0;
        }
    cout << 1 << '\n';
    return 0;
}

