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

using namespace std;

#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define FORR(i,a,b) for (int i=(a);i>=(b);i--)

typedef long long ll;
const int INF = 1e9;
const int MOD = 1e9+7;
const double EPS = 1e-9;


int main() {
    int N;
    cin >> N;
    vector<int> x(N+2), y(N+2);

    FOR(i, 0, N) {
        cin >> x[i] >> y[i];
    }
    x[N] = x[0]; y[N] = y[0];
    x[N+1] = x[1]; y[N+1] = y[1];

    auto cross = [](double a, double b, double c, double d) -> double {
        return a * d - b * c;
    };

    int result = 1;
    FOR(i, 0, N) {
        double p = cross(x[i+1]-x[i], y[i+1]-y[i],
                x[i+2]-x[i+1], y[i+2]-y[i+1]);
        if (p < 0) {
            result = 0;
            break;
        }
    }

    cout << result << endl;

    return 0;
}