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 CP = complex<long double>;
#define X real()
#define Y imag()
const long double PI = acos(-1.0L);
const long double EPS = 1e-10;
// conj(x) : complex conjugate,(0,1)->(0,-1)
// abs(x) : dist between(0,0) and x
// norm(x) : abs(x) * abs(x)
// arg(x) : argment,[-PI,PI]

// dot(a,b) = |a||b|cos x
long double dot(CP a, CP b) { return (conj(a) * b).X; }
// cross(a,b) : area of parallelogram
// sign : a-> b ,counter clockwise? + : -
long double cross(CP a, CP b) { return (conj(a) * b).Y; }
long double corner(CP a, CP b) {
  //[0,PI]
  return acos(dot(a, b) / (abs(a) * abs(b)));
}

CP projection(CP p, CP s, CP t) {
  CP base = t - s;
  long double r = dot(p - s, base) / norm(base);
  return s + base * r;
}

CP reflection(CP p, CP s, CP t) {
  CP tmp = (projection(p, s, t) - p);
  tmp *= 2;
  return p + tmp;
}

CP intersectionLL(CP a, CP b, CP c, CP d) {
  return a + (b - a) * (cross(d - c, c - a) /
                        cross(d - c, b - a));
}

bool on_seg(CP a, CP b, CP p) {
  // if not use end point, dot(a - p, b - p) < 0
  return abs(cross(a - p, b - p)) <= 1e-10 &&
         dot(a - p, b - p) <= 0;
}

// crossing lines? (a,b) and (c,d)
bool iscross(CP a, CP b, CP c, CP d) {
  // parallel
  if(abs(cross(a - b, c - d)) <= 1e-10) {
    return on_seg(a, b, c) || on_seg(a, b, d) ||
           on_seg(c, d, a) || on_seg(c, d, b);
  }
  CP isp = intersectionLL(a, b, c, d);
  return on_seg(a, b, isp) && on_seg(c, d, isp);
}

long double distLP(CP a, CP b, CP p) {
  return abs(cross(b - a, p - a) / abs(b - a));
}

// segmentver.
long double distSP(CP a, CP b, CP p) {
  if(dot(b - a, p - a) < 0) return abs(p - a);
  if(dot(a - b, p - b) < 0) return abs(p - b);
  return distLP(a, b, p);
}

// segment and segment
long double distSS(CP a, CP b, CP c, CP d) {
  long double res = 1e18;
  if(iscross(a, b, c, d)) return 0.0L;
  res = min(res, distSP(a, b, c));
  res = min(res, distSP(a, b, d));
  res = min(res, distSP(c, d, a));
  res = min(res, distSP(c, d, b));
  return res;
}

// counter clockwise
bool is_convex(const vector<CP> &v) {
  int n = v.size();
  for(int i = 0; i < n; ++i)
    if(cross(v[(i + 1) % n] - v[i],
             v[(i + 2) % n] - v[(i + 1) % n]) < -EPS)
      return 0;
  return 1;
}

vector<CP> convex_hull(vector<CP> &ps) {
  auto lmd = [&](const CP &l, const CP &r) {
    if(l.X != r.X) return l.X < r.X;
    return l.Y < r.Y;
  };
  vector<CP> qs;
  int psize = ps.size();
  sort(ps.begin(), ps.end(), lmd);
  int k = 0;
  qs.resize(psize * 2);
  for(int i = 0; i < psize; ++i) {
    while(k > 1 && cross(qs[k - 1] - qs[k - 2],
                         ps[i] - qs[k - 1]) <= 0)
      --k;
    qs[k++] = ps[i];
  }
  for(int i = psize - 2, t = k; i >= 0; --i) {
    while(k > t && cross(qs[k - 1] - qs[k - 2],
                         ps[i] - qs[k - 1]) <= 0)
      --k;
    qs[k++] = ps[i];
  }
  qs.resize(k - 1);
  return qs;
}

long double convex_diameter(vector<CP> &newv) {
  vector<CP> v = convex_hull(newv);
  int n = v.size(), i = 0, j = 0;
  if(n == 2) return abs(v[0] - v[1]);
  for(int k = 0; k < n; ++k) {
    if(v[k].X < v[i].X) i = k;
    if(v[k].X > v[j].X) j = k;
  }
  long double res = 0;
  int si = i, sj = j;
  while(i != sj || j != si) {
    res = max(res, abs(v[i] - v[j]));
    if(cross(v[(i + 1) % n] - v[i], v[(j + 1) % n] - v[j]) <
       0)
      (++i) %= n;
    else
      (++j) %= n;
  }
  return res;
}

struct Circle {
  CP o;
  long double r;
  Circle(long double _x = 0.0L, long double _y = 0.0L,
         long double _r = 0.0L)
      : o(CP(_x, _y)), r(_r) {}
};

void intersectionCL(Circle ci, CP s, CP t, CP &res1,
                    CP &res2) {
  res1 = res2 = projection(ci.o, s, t);
  long double r = sqrtl(ci.r * ci.r - norm(res1 - ci.o));
  t -= s;
  t *= r / abs(t);
  res1 += t;
  res2 -= t;
  if(res1.X > res2.X ||
     (res1.X == res2.X && res1.Y > res2.Y))
    swap(res1, res2);
}

long double polygonarea(vector<CP> &v) {
  int n = v.size();
  long double res = 0;
  for(int i = 0; i < n; ++i)
    res +=
        (v[(i - 1 + n) % n].X - v[(i + 1) % n].X) * v[i].Y;
  return res / 2.0L;
}

long long n, q;
vector<CP> v;

int main() {
  cout << fixed << setprecision(10);
  cin >> n;
  for(int i = 0; i < n; ++i) {
    long double a, b;
    cin >> a >> b;
    v.emplace_back(a, b);
  }
  cout << is_convex(v) << endl;

  return 0;
}
