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 <cstdio>
#include <cstring>
#include <queue>
#include <cmath>
#include <algorithm>
using namespace std;
const int N = 1e4;
const double eps = 1e-8;
const double inf = 1e20;
inline double sqr (double k) {return k * k;}
inline int sgn (double p) {
    if (fabs (p) < eps) return 0;
    if (p < 0) return -1;
    return 1;
}
struct point {
    double x, y;
    point () {}
    point (double _x, double _y) {
        x = _x, y = _y;
    }
    void input () {
        scanf ("%lf %lf", &x, &y);
    }
    bool operator == (point b) const {
        return sgn (x - b.x) == 0 && sgn (y - b.y) == 0;
    }
    point operator - (const point &b) const {
        return point (x - b.x, y - b.y);
    }
    double operator * (const point &b) const {
        return x * b.x + y * b.y;
    }
    double operator ^ (const point &b) const {
        return x * b.y - y * b.x;
    }
    double len () {
        return hypot (x, y);
    }
    double len2 () {
        return x * x + y * y;
    }
    double distance (point p) {
        return hypot (x - p.x, y - p.y);
    }
    point operator + (const point &b) const {
        return point (x + b.x, y + b.y);
    }
    point operator * (const double &b) const {
        return point (x * b, y * b);
    }
    point operator / (const double &b) const {
        return point (x / b, y / b);
    }
    double cross (point a, point b) {///叉积
        return (a - *this) ^ (b - *this);
    }
    double dot (point a, point b) {///点积
        return (a - *this) * (b - *this);
    }
    bool on_seg (point a, point b) {///点是否在线段ab上
        return sgn (cross (a, b)) == 0 && dot (a, b) <= 0;
    }
} ps[N];
///两线段是否相交
bool seg (point a, point b, point c, point d) {
    if (a.on_seg (c, d) || b.on_seg (c, d) || c.on_seg (a, b) || d.on_seg (a, b)) return true;
    if (a.cross (b, d) * a.cross (b, c) < 0 && c.cross (d, b) * c.cross (d, a) < 0) return true;
    return false;
}
/// 点的投影是否在线段ab上
bool check (point p, point a, point b) {
    point x = b - a;
    double k = x.len ();
    double u = a.dot (p, b) / k;
    x = (x / k) * u;
    x = x + a;
    if (x.on_seg (a, b)) return true;
    return false;
}
int cmp (point a, point b) {
    if ((a ^ b) > 0) return true;
    return false;
}
int main () {
    int n, ans = 1;
    cin >> n;
    for (int i = 1; i <= n; i++) ps[i].input ();
//    for (int i = 1; i <= n; i++) cout << ps[i].x << ' ' << ps[i].y << endl;
    ps[0] = ps[n];
    ps[n + 1] = ps[1];
    for (int i = 1; i <= n; i++) {
        if (ps[i].cross (ps[i - 1], ps[i + 1]) > 0) ans = 0;
//        cout << i << ' ' << ps[i].cross (ps[i - 1], ps[i + 1]) << ' ' << ps[i].x << ' ' << ps[i].y << endl;
    }
    cout << ans << endl;
    return 0;
}

