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

template <class T>
inline T sq(T x) { return x * x; }

using Real = long double;
using Point = std::complex<Real>;
using Segment = std::pair<Point, Point>;
using Polygon = std::vector<Point>;

const Real EPS = 1e-10;
const Point origin(0, 0);

// 宇宙船演算子
inline Real compare(Real a, Real b) {
    if (std::abs(a - b) < EPS) return 0;
    return a - b > 0 ? 1 : -1;
}

inline Real dist(Point a, Point b) {
    return std::abs(a - b);
}

inline Real length(Segment s) {
    return dist(s.first, s.second);
}

// inner product
inline Real dot(Point x, Point y) {
    return std::real(std::conj(x) * (y));
}

// outer product
inline Real cross(Point x, Point y) {
    return std::imag(std::conj(x) * (y));
}

// lに対するxの正射影
Point proj(Segment s, Point p) {
    Real ratio = dot(s.second - s.first, p - s.first) / sq(length(s));
    return s.first + (s.second - s.first) * ratio;
}

// lを軸としてxに対称な点
Point refl(Segment s, Point p) {
    Point t = proj(s, p);
    return t + (t - p);
}

// lに対するpの位置
// counter clockwise -> 1, clockwise   -> -1
// online front      -> 2, online back -> -2
// on segment        -> 0
int side(Segment s, Point p) {
    Real c = cross(s.second - s.first, p - s.first);
    if (compare(c, 0) != 0) return compare(c, 0);

    Real d = dot(s.second - s.first, p - s.first);
    if (compare(d, 0) < 0) return -2;

    return (compare(length(Segment(s.first, p)), length(s)) > 0 ? 2 : 0);
}

inline bool isorthogonal(Segment s1, Segment s2) {
    return compare(dot(s1.second - s1.first, s2.second - s2.first), 0) == 0;
}

inline bool isparallel(Segment s1, Segment s2) {
    return compare(cross(s1.second - s1.first, s2.second - s2.first), 0) == 0;
}

inline bool intersect(Segment s1, Segment s2) {
    return (side(s1, s2.first) * side(s1, s2.second) <= 0) &&
           (side(s2, s1.first) * side(s2, s1.second) <= 0);
}

Point intersection(Segment s1, Segment s2) {
    Real c1 = cross(s2.second - s2.first, s1.second - s1.first);
    Real c2 = cross(s2.second - s2.first, s1.first - s2.first);
    return s1.first + (s1.second - s1.first) * (-c2 / c1);
}

// distanceのオーバーロード
Real dist(Segment s, Point p) {
    Point t = proj(s, p);
    if (side(s, t) == 0) return dist(p, t);
    return std::min(dist(p, s.first), dist(p, s.second));
}

Real dist(Segment s1, Segment s2) {
    if (intersect(s1, s2)) return 0;
    return std::min({dist(s1, s2.first),
                     dist(s1, s2.second),
                     dist(s2, s1.first),
                     dist(s2, s1.second)});
}

// 符号付き面積
inline Real triangle(Point a, Point b, Point c) {
    return cross(b - a, c - a) / 2;
}

// 時計回りか反時計回りであることを要請
Real area(const Polygon& g) {
    Real S = 0;
    for (int i = 0; i < g.size(); ++i) {
        S += triangle(origin, g[i], g[(i + 1) % g.size()]);
    }
    return S;
}

bool isconvex(const Polygon& g) {
    for (int i = 0; i < g.size(); ++i) {
        if (side(Segment(g[i], g[(i + 1) % g.size()]),
                 g[(i + 2) % g.size()]) == -1) return false;
    }
    return true;
}


#include <iostream>
#include <iomanip>

using namespace std;

int main() {
    int N;
    cin >> N;

    Polygon g(N);
    for (auto& p : g) {
        Real x, y;
        cin >> x >> y;
        p = Point(x, y);
    }

    cout << isconvex(g) << endl;
    return 0;
}

