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 = 1e12;
const double PI = acos(-1);
namespace std {
bool operator<(const complex<double> &a, const complex<double> &b) {
  return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
}
}  // namespace std
double cross(const complex<double> &a, const complex<double> &b) {
  return imag(conj(a) * b);
}
double dot(const complex<double> &a, const complex<double> &b) {
  return real(conj(a) * b);
}
struct L : public vector<complex<double> > {
  L(const complex<double> &a, const complex<double> &b) {
    push_back(a);
    push_back(b);
  }
};
struct C {
  complex<double> p;
  double r;
  C(const complex<double> &p, double r) : p(p), r(r) {}
};
int ccw(complex<double> a, complex<double> b, complex<double> c) {
  b -= a;
  c -= a;
  if (cross(b, c) > 0) return +1;
  if (cross(b, c) < 0) return -1;
  if (dot(b, c) < 0) return +2;
  if (norm(b) < norm(c)) return -2;
  return 0;
}
bool intersectLL(const L &l, const L &m) {
  return abs(cross(l[1] - l[0], m[1] - m[0])) > EPS ||
         abs(cross(l[1] - l[0], m[0] - l[0])) < EPS;
}
bool intersectLS(const L &l, const L &s) {
  return cross(l[1] - l[0], s[0] - l[0]) * cross(l[1] - l[0], s[1] - l[0]) <
         EPS;
}
bool intersectLP(const L &l, const complex<double> &p) {
  return abs(cross(l[1] - p, l[0] - p)) < EPS;
}
bool intersectSS(const L &s, const L &t) {
  return ccw(s[0], s[1], t[0]) * ccw(s[0], s[1], t[1]) <= 0 &&
         ccw(t[0], t[1], s[0]) * ccw(t[0], t[1], s[1]) <= 0;
}
bool intersectSP(const L &s, const complex<double> &p) {
  return abs(s[0] - p) + abs(s[1] - p) - abs(s[1] - s[0]) < EPS;
}
complex<double> projection(const L &l, const complex<double> &p) {
  double t = dot(p - l[0], l[0] - l[1]) / norm(l[0] - l[1]);
  return l[0] + t * (l[0] - l[1]);
}
complex<double> reflection(const L &l, const complex<double> &p) {
  return p + 2.0 * (projection(l, p) - p);
}
double distanceLP(const L &l, const complex<double> &p) {
  return abs(p - projection(l, p));
}
double distanceLL(const L &l, const L &m) {
  return intersectLL(l, m) ? 0 : distanceLP(l, m[0]);
}
double distanceLS(const L &l, const L &s) {
  if (intersectLS(l, s)) return 0;
  return min(distanceLP(l, s[0]), distanceLP(l, s[1]));
}
double distanceSP(const L &s, const complex<double> &p) {
  const complex<double> r = projection(s, p);
  if (intersectSP(s, r)) return abs(r - p);
  return min(abs(s[0] - p), abs(s[1] - p));
}
double distanceSS(const L &s, const L &t) {
  if (intersectSS(s, t)) return 0;
  return min(min(distanceSP(s, t[0]), distanceSP(s, t[1])),
             min(distanceSP(t, s[0]), distanceSP(t, s[1])));
}
complex<double> crosspoint(const L &l, const L &m) {
  double A = cross(l[1] - l[0], m[1] - m[0]);
  double B = cross(l[1] - l[0], l[1] - m[0]);
  if (abs(A) < EPS && abs(B) < EPS) return m[0];
  if (abs(A) < EPS) assert(false);
  return m[0] + B / A * (m[1] - m[0]);
}
enum { OUT, ON, IN };
int contains(const vector<complex<double> > &pol, const complex<double> &p) {
  if (pol.size() < 2) return OUT;
  if (intersectSP({pol[0], pol[1]}, p)) return ON;
  bool f = cross(pol[1] - pol[0], p - pol[0]) > 0;
  for (int i = 1; i < pol.size(); i++) {
    auto &now = pol[i];
    auto &nxt = pol[(i + 1) % pol.size()];
    if (intersectSP({nxt, now}, p)) return ON;
    if (f ^ (cross(nxt - now, p - now) > 0)) return OUT;
  }
  return IN;
}
bool contains(const vector<complex<double> > &a,
              const vector<complex<double> > &b) {
  for (int i = (int)(0); i < (int)(a.size()); i++)
    if (contains(b, a[i]) == OUT) return false;
  return true;
}
enum { NO_HIT, HIT, A_IN_B, B_IN_A };
int isHit(const vector<complex<double> > &a,
          const vector<complex<double> > &b) {
  if (contains(a, b)) return A_IN_B;
  if (contains(b, a)) return B_IN_A;
  for (int i = (int)(0); i < (int)(a.size()); i++)
    for (int j = (int)(0); j < (int)(b.size()); j++) {
      L la(a[i], a[(i + 1) % a.size()]), lb(b[j], b[(j + 1) % b.size()]);
      if (intersectSS(la, lb)) return HIT;
    }
  return NO_HIT;
}
complex<double> spinP(const complex<double> &p, double theta,
                      double ext = 1.0) {
  return p * complex<double>(cos(theta), sin(theta)) * ext;
}
complex<double> makeP(double r, double arg) {
  return complex<double>(r * cos(arg), r * sin(arg));
}
vector<complex<double> > crossPoint(const C &a, const C &b) {
  double d = abs(b.p - a.p);
  double arg = atan2(real(b.p - a.p), real(b.p - a.p));
  double arg2 = acos((d * d + a.r * a.r - b.r * b.r) / (2 * d * a.r));
  if (abs(arg2) < EPS) return {a.r * makeP(1.0, arg) + a.p};
  if (abs(a.r - b.r) < d && d < a.r + b.r)
    return {a.r * makeP(1.0, arg + arg2) + a.p,
            a.r * makeP(1.0, arg - arg2) + a.p};
  return {};
}
vector<L> comonTang(C c1, C c2) {
  vector<L> ret;
  if (c1.r > c2.r) swap(c1, c2);
  complex<double> sub = c1.p;
  c1.p -= sub;
  c2.p -= sub;
  double theta = atan2(c2.p.imag(), c2.p.real());
  c2.p = spinP(c2.p, -theta);
  int signX = 0;
  if (c2.p.real() > 0) signX = 1;
  if (c2.p.real() < 0) signX = -1;
  double x = abs(c2.p.real()), r1 = c1.r, r2 = c2.r;
  if (x * x > (r2 - r1) * (r2 - r1)) {
    double theta2 = asin((r2 - r1) / x);
    ret.push_back({spinP({0, r1}, theta2),
                   spinP({sqrt(x * x - (r2 - r1) * (r2 - r1)), r1}, theta2)});
    ret.push_back({spinP({0, -r1}, -theta2),
                   spinP({sqrt(x * x - (r2 - r1) * (r2 - r1)), -r1}, -theta2)});
  }
  if (x > r1 + r2) {
    double theta3 = PI / 2 - acos((r1 + r2) / x);
    double len = sqrt((r1 * x) * (r1 * x) / (r1 + r2) / (r1 + r2) - r1 * r1) +
                 sqrt((r2 * x) * (r2 * x) / (r1 + r2) / (r1 + r2) - r2 * r2);
    ret.push_back({spinP({0, r1}, -theta3), spinP({len, r1}, -theta3)});
    ret.push_back({spinP({0, -r1}, -theta3), spinP({len, -r1}, theta3)});
  }
  for (auto &l : ret) {
    if (signX == -1) l[1] = {-l[1].real(), l[1].imag()};
    l[0] = spinP(l[0], theta);
    l[1] = spinP(l[1], theta);
    l[0] += sub;
    l[1] += sub;
  }
  return ret;
}
double getArea(const vector<complex<double> > &pol) {
  int n = pol.size();
  double s = 0.0;
  for (int i = 0; i < n; i++) {
    int now = i, nxt = (i + 1) % n;
    s += (pol[now].real() - pol[nxt].real()) *
         (pol[now].imag() + pol[nxt].imag());
  }
  return abs(s / 2.0);
}
vector<complex<double> > convex_hull(vector<complex<double> > ps) {
  int n = ps.size(), k = 0;
  sort(ps.begin(), ps.end());
  vector<complex<double> > ch(2 * n);
  for (int i = 0; i < n; ch[k++] = ps[i++])
    while (k >= 2 && ccw(ch[k - 2], ch[k - 1], ps[i]) <= 0) --k;
  for (int i = n - 2, t = k + 1; i >= 0; ch[k++] = ps[i--])
    while (k >= t && ccw(ch[k - 2], ch[k - 1], ps[i]) <= 0) --k;
  ch.resize(k - 1);
  return ch;
}
int main() {
  int n;
  cin >> n;
  vector<complex<double> > g;
  for (int i = (int)(0); i < (int)(n); i++) {
    double x, y;
    cin >> x >> y;
    g.push_back({x, y});
  }
  cout << (n == convex_hull(g).size()) << endl;
}
