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 <cmath>
#include <complex>
#include <algorithm>
#include <cassert>

#include <iostream>
#include <cstdio>

using namespace std;

#define loop(i,a,b) for(int i=(a);i<int(b);i++)
#define rep(i,b) loop(i,0,b)

typedef long double Real;
const Real EPS = 1e-10;
const Real INF = 1e100;
const Real PI = acos(-1);

typedef complex<Real> Point;
#define PCR Point const &
#define X real()
#define Y imag()
namespace std {
    bool operator < (PCR a, PCR b){
        return abs(a.X - b.X) > EPS ? a.X < b.X : a.Y < b.Y;
    }
}

struct Segment {
    Point p[2];
    Segment (PCR a = Point(), PCR b = Point()){
        p[0] = a, p[1] = b;
    }
    Point & operator [] (int k) { return p[k]; }
    Point const & operator [] (int k) const { return p[k]; }
};

typedef vector<Point> Polygon;
#define prev(g,i) ((g)[(i-1+g.size())%(g.size())])
#define curr(g,i) ((g)[(i)])
#define next(g,i) ((g)[(i+1)%(g.size())])

struct Circle { Real radius; Point center; };

Real dot(PCR a, PCR b){
    return a.X*b.X + a.Y*b.Y;
}
Real cross(PCR a, PCR b){
    return a.X*b.Y - a.Y*b.X;
}

enum { LEFT = 1, RIGHT = -1, BACK = 2, FRONT = -2, ON = 0 };
// Includes end-points. Comment in to exclude.
int ccw(PCR x, PCR p, PCR q){
    Point a = p - x, b = q - x;
    if(cross(a,b) > EPS) return LEFT;
    if(cross(a,b) < -EPS) return RIGHT;
    if(/* abs(a) < EPS || */ dot(a,b) < -EPS) return BACK;
    if(/* abs(b) < EPS || */ norm(a) < norm(b)) return FRONT;
    return ON;
}

bool isParallel(Segment const & s, Segment const & t){
    return abs(cross(s[1]-s[0],t[1]-t[0])) < EPS;
}

bool isOrthogonal(Segment const & s, Segment const & t){
    return abs(dot(s[1]-s[0],t[1]-t[0])) < EPS;
}

Point pSP(Segment const & s, PCR p){
    Point base = s[1] - s[0];
    Real r = dot(p - s[0], base) / norm(base);
    return s[0] + base * r;
}

Point rSP(Segment const & s, PCR p){
    Point v = pSP(s,p) - p;
    return p + v * Real(2);
}

// Includes end-points. Modify CCW to exclude
bool iSS(Segment const & s, Segment const & t){
    bool f1 = ccw(s[0],s[1],t[0]) * ccw(s[0],s[1],t[1]) <= 0;
    bool f2 = ccw(t[0],t[1],s[0]) * ccw(t[0],t[1],s[1]) <= 0;
    return f1 && f2;
}

bool iSP(Segment const & s, PCR p){
    return ccw(s[0],s[1],p) == ON;
}

Point cSS(Segment const & s, Segment const & t){
    assert(iSS(s,t));
    assert(!isParallel(s,t));
    Real d = cross(t[1]-t[0], s[1]-s[0]);
    return s[0] + (s[1] - s[0]) * cross(t[1]-t[0], t[1]-s[0]) * (1.0 / d);
}

Real dLP(const Segment & l, PCR p){
    return abs(cross(l[1]-l[0], p - l[0]) / (l[0]-l[1]));
}

Real dSP(const Segment & s, PCR p){
    const Point r = pSP(s, p);
    if(iSP(s,r)) return abs(r-p);
    return min(abs(s[0]-p), abs(s[1]-p));
}

Real dSS(Segment const & s, Segment const & t){
    if(iSS(s,t)) return Real(0);
    return min(min(dSP(s,t[0]), dSP(s,t[1])), min(dSP(t,s[0]), dSP(t,s[1])));
}

// res is positive if sorted in counter clock wise, nagative if sorted in clock wise.
Real area(Polygon const & g){
    Real res(0);
    rep(i,g.size()) res += cross(curr(g,i), next(g,i));
    return abs(res/2);
}

Polygon convexFull(Polygon g){
    int n = g.size(), k = 0;
    sort(g.begin(), g.end());
    Polygon res(2*n);
    for (int i = 0; i < n; res[k++] = g[i++]) // lower-hull
        while (k >= 2 && ccw(res[k-2], res[k-1], g[i]) <= 0) --k;
    for (int i = n-2, t = k+1; i >= 0; res[k++] = g[i--]) // upper-hull
        while (k >= t && ccw(res[k-2], res[k-1], g[i]) <= 0) --k;
    res.resize(k-1);
    return res;
}

int main(){
    int n;
    Real x,y;
    cin >> n;
    Polygon g(n);
    rep(i,n){
        cin >> x >> y;
        g[i] = Point(x,y);
    }
    puts(convexFull(g).size()==g.size() ? "1" : "0");
}