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;
const double EPS = 1e-8;
const double INF = 1e10;
const double PI = M_PI;
struct P {
  double x, y;
  P(double xs, double ys) : x(xs), y(ys) {}
  P() {}
};
P operator+(P a, P b) { return P(a.x + b.x, a.y + b.y); }
P operator-(P a, P b) { return P(a.x - b.x, a.y - b.y); }
P operator*(P p, double s) { return P(p.x * s, p.y * s); }
double inp(P a, P b) { return a.x * b.x + a.y * b.y; }
double outp(P a, P b) { return a.x * b.y - a.y * b.x; }
double norm(P p) { return inp(p, p); }
double abs(P p) { return sqrt(norm(p)); }
bool eq(P a, P b) { return abs(a - b) < EPS; }
double arg(P p) { return atan2(p.y, p.x); }
P rot90(P p) { return P(-p.y, p.x); }
P rot(P p, double radian) {
  P q;
  q.x = cos(radian) * p.x - sin(radian) * p.y;
  q.y = sin(radian) * p.x + cos(radian) * p.y;
  return q;
}
struct L : vector<P> {
  P a, b;
  L(P as, P bs) : a(as), b(bs) {}
};
P projection(L l, P p) {
  P a = l.b - l.a;
  P b = p - l.a;
  double t = inp(b, a) / norm(a);
  return l.a + a * t;
}
P reflection(L l, P p) { return p + (projection(l, p) - p) * 2; }
int ccw(P a, P b, P c) {
  b = b - a;
  c = c - a;
  if (outp(b, c) > EPS) return +1;
  if (outp(b, c) < -EPS) return -1;
  if (inp(b, c) < 0) return +2;
  if (norm(b) < norm(c)) return -2;
  return 0;
}
bool iSS(L s, L t) {
  return ccw(s.a, s.b, t.a) * ccw(s.a, s.b, t.b) <= 0 &&
         ccw(t.a, t.b, s.a) * ccw(t.a, t.b, s.b) <= 0;
}
bool iSP(L s, P p) { return ccw(s.a, s.b, p) == 0; }
double dSP(L s, P p) {
  P r = projection(s, p);
  if (iSP(s, r)) return abs(r - p);
  return min(abs(s.a - p), abs(s.b - p));
}
double dSS(L s, L t) {
  if (iSS(s, t)) return 0;
  return min(min(dSP(s, t.a), dSP(s, t.b)), min(dSP(t, s.a), dSP(t, s.b)));
}
P cLL(L l, L m) {
  double d = outp(m.b - m.a, l.b - l.a);
  return l.a + (l.b - l.a) * outp(m.b - m.a, m.b - l.a) * (1.0 / d);
}
P at(const vector<P> &ps, int i) { return ps[i % ps.size()]; }
double polyArea(const vector<P> &ps) {
  double res = 0.0;
  for (int i = 0; i < (int)ps.size(); i++) {
    res += outp(at(ps, i), at(ps, i + 1));
  }
  return res / 2.0;
}
struct C {
  P p;
  double r;
  C(P ps, double rs) : p(ps), r(rs) {}
  C() {}
};
int main() {
  int N;
  scanf(" %d", &N);
  vector<P> ps(N);
  for (int i = 0; i < N; i++) {
    scanf(" %lf %lf", &ps[i].x, &ps[i].y);
  }
  int k = ccw(at(ps, 0), at(ps, 1), at(ps, 2));
  int f = 1;
  for (int i = 1; i < N; i++) {
    if (ccw(at(ps, i), at(ps, i + 1), at(ps, i + 2)) != k) f = 0;
  }
  cout << f << endl;
}
