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 <bits/stdc++.h>
using namespace std;

using ld = long double;
const ld eps = 1e-8, pi = acos(-1.0);

bool eq(ld a, ld b) {
	return abs(a - b) < eps;
}

using point = complex<ld>;

ld dot(point a, point b) {
	return real(conj(a) * b);
}

ld cross(point a, point b) {
	return imag(conj(a) * b);
}

int ccw(point a, point b, point c) {
	b -= a, c -= a;
	if (cross(b, c) > eps) return 1;	// a,b,c counter-clockwise
	if (cross(b, c) < -eps) return -1;	// a,b,c clockwise
	if (dot(b, c) < 0) return 2;		// c,a,b on a line
	if (norm(b) < norm(c)) return -2;	// a,b,c on a line
	return 0;							// a,c,b on a line
}

struct line {
	point a, b;
	line() : a(), b() {}
	line(const point& a_, const point &b_)
		: a(a_), b(b_) {}
};

bool isis_ll(line l, line m) {
	return abs(cross(l.b - l.a, m.b - m.a)) > eps;
}

bool isis_ls(line l, line s) {
	return (cross(l.b - l.a, s.a - l.a) * cross(l.b - l.a, s.b - l.a) < eps);
}

bool isis_lp(line l, point p) {
	return abs(cross(l.b - p, l.a - p)) < eps;
}

bool isis_sp(line s, point p) {
	return abs(s.a - p) + abs(s.b - p) - abs(s.b - s.a) < eps;
}

point proj(line l, point p) {
	ld t = dot(p - l.a, l.a - l.b) / norm(l.a - l.b);
	return l.a + t * (l.a - l.b);
}

point is_ll(line s, line t) {
	point sv = s.b - s.a, tv = t.b - t.a;
	assert(cross(sv, tv) != 0);
	return s.a + sv * cross(tv, t.a - s.a) / cross(tv, sv);
}

bool isis_ss(line s, line t) {
	if (isis_ll(s, t)) return isis_ls(s, t) && isis_ls(t, s);
	return isis_sp(s, t.a) || isis_sp(s, t.b) || isis_sp(t, s.a);
}

ld dist_lp(line l, point p) {
	return abs(p - proj(l, p));
}

ld dist_ll(line l, line m) {
	return isis_ll(l, m) ? 0 : dist_lp(l, m.a);
}

ld dist_ls(line l, line s) {
	return isis_ls(l, s) ? 0 : min(dist_lp(l, s.a), dist_lp(l, s.b));
}

ld dist_sp(line s, point p) {
	point r = proj(s, p);
	return isis_sp(s, r) ? abs(r - p) : min(abs(s.a - p), abs(s.b - p));
}

ld dist_ss(line s, line t) {
	if (isis_ss(s, t)) return 0;
	return min({ dist_sp(s, t.a), dist_sp(s, t.b), dist_sp(t, s.a), dist_sp(t, s.b) });
}

vector<point> convex_hull(vector<point> ps) {
	sort(ps.begin(), ps.end(), [](const point& a, const point& b) {
		return a.real() == b.real() ? a.imag() < b.imag() : a.real() < b.real();
	});
	int k = 0;
	const int n = ps.size();
	vector<point> qs(n + 1);
	for (int i = 0; i < n; ++i) {
		while (k > 1 && ccw(qs[k - 2], qs[k - 1], ps[i]) <= 0) {
			k--;
		}
		qs[k++] = ps[i];
	}
	for (int i = n - 2, t = k; i >= 0; --i) {
		while (k > t && ccw(qs[k - 2], qs[k - 1], ps[i]) <= 0) {
			k--;
		}
		qs[k++] = ps[i];
	}
	qs.resize(k - 1);
	return qs;
}

bool is_convex(const vector<point>& ps) {
	const int n = ps.size();
	if (n < 3) return false;
	for (int i = 0; i < n; i++) {
		int c = ccw(ps[i], ps[(i + 1) % n], ps[(i + 2) % n]);
		if (c == -1) return false;
	}
	return true;
}

int main()
{
	int n;
	cin >> n;
	vector<point> ps;
	for (int i = 0; i < n; i++) {
		int x, y;
		cin >> x >> y;
		ps.emplace_back(x, y);
	}
	cout << is_convex(ps) << endl;
	return 0;
}

