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-12;
const double PI = acos(-1.0);
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);
}
bool operator==(const complex<double> &a, const complex<double> &b) {
  return (abs(a.real() - b.real()) < EPS && abs(a.imag() - b.imag()) < EPS);
}
}  // namespace std
struct circle {
  complex<double> p;
  double r;
  circle() {}
  circle(const complex<double> &p, double r) : p(p), r(r) {}
};
struct segment : public vector<complex<double> > {
  segment(const complex<double> &a, const complex<double> &b) {
    push_back(a);
    push_back(b);
  }
};
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);
}
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 segment &l, const segment &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 segment &l, const segment &s) {
  return cross(l[1] - l[0], s[0] - l[0]) * cross(l[1] - l[0], s[1] - l[0]) <
         EPS;
}
bool intersectLP(const segment &l, const complex<double> &p) {
  return abs(cross(l[1] - p, l[0] - p)) < EPS;
}
bool intersectSP(const segment &s, const complex<double> &p) {
  return abs(s[0] - p) + abs(s[1] - p) - abs(s[1] - s[0]) < EPS;
}
bool intersectSS(const segment &s, const segment &t) {
  if (intersectSP(s, t[0]) || intersectSP(s, t[1]) || intersectSP(t, s[0]) ||
      intersectSP(t, s[1]))
    return true;
  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;
}
complex<double> projection(const segment &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 segment &l, const complex<double> &p) {
  return p + 2. * (projection(l, p) - p);
}
double distanceLP(const segment &l, const complex<double> &p) {
  return abs(p - projection(l, p));
}
double distanceLL(const segment &l, const segment &m) {
  return intersectLL(l, m) ? 0 : distanceLP(l, m[0]);
}
double distanceLS(const segment &l, const segment &s) {
  if (intersectLS(l, s)) return 0;
  return min(distanceLP(l, s[0]), distanceLP(l, s[1]));
}
double distanceSP(const segment &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 segment &s, const segment &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])));
}
double distancePP(const complex<double> &a, const complex<double> &b) {
  return abs(a - b);
}
complex<double> crosspoint(const segment &l, const segment &m) {
  if (!intersectSS(l, m)) return complex<double>(1000000000, 1000000000);
  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 complex<double>(1000000000, 1000000000);
  if (abs(A) < EPS) return complex<double>(1000000000, 1000000000);
  return m[0] + B / A * (m[1] - m[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 contains(const vector<complex<double> > &Poly, const complex<double> &p) {
  bool in = false;
  for (int i = 0; i < Poly.size(); ++i) {
    complex<double> a = Poly[i] - p, b = Poly[(i + 1) % Poly.size()] - p;
    if (imag(a) > imag(b)) swap(a, b);
    if (imag(a) <= 0 && 0 < imag(b))
      if (cross(a, b) < 0) in = !in;
    if (cross(a, b) == 0 && dot(a, b) <= 0) return 1;
  }
  return in ? 2 : 0;
}
bool block_off(const complex<double> &a, const complex<double> &b,
               const vector<complex<double> > &obj) {
  complex<double> m = (a + b) / 2.0;
  bool on = false, in = false;
  for (int j = 0; j < obj.size(); ++j) {
    complex<double> c = obj[j], d = obj[(j + 1) % obj.size()];
    if (imag(d) < imag(c)) swap(c, d);
    if (cross(a - c, b - c) * cross(a - d, b - d) < 0 &&
        cross(c - a, d - a) * cross(c - b, d - b) < 0)
      return true;
    if (cross(a - c, b - c) == 0 && dot(a - c, b - c) < 0) return true;
    if (imag(c) <= imag(m) && imag(m) < imag(d))
      if (cross(c - m, d - m) < 0) in = !in;
    if (cross(c - m, d - m) == 0 && dot(c - m, d - m) <= 0) on = true;
  }
  return !on && in;
}
double area(const vector<complex<double> > &p) {
  double A = 0;
  for (int i = 0; i < p.size(); ++i) A += cross(p[i], p[(i + 1) % p.size()]);
  return A / 2.;
}
double add_rad(double a, double b) {
  double ret = a + b;
  if (ret > PI) ret -= 2 * PI;
  return ret;
}
double angle(const complex<double> &a, const complex<double> &b) {
  auto tmp = abs(arg(a) - arg(b));
  return min(tmp, 2 * PI - tmp);
}
double angle(const segment &s1, const segment &s2) {
  return angle(s1[1] - s1[0], s2[1] - s2[0]);
}
complex<double> rotate(const complex<double> &p, double rad) {
  double X = p.real() * cos(rad) - p.imag() * sin(rad);
  double Y = p.imag() * cos(rad) + p.real() * sin(rad);
  return complex<double>(X, Y);
}
bool isParallel(const complex<double> &a, const complex<double> &b) {
  return abs(cross(a, b)) < EPS;
}
bool isParallel(const segment &a, const segment &b) {
  return isParallel(a[1] - a[0], b[1] - b[0]);
}
bool isOrthogonal(const complex<double> &a, const complex<double> &b) {
  return abs(angle(a, b) - PI / 2) < EPS;
}
bool isOrthogonal(const segment &a, const segment &b) {
  return isOrthogonal(a[1] - a[0], b[1] - b[0]);
}
int main() {
  int n;
  cin >> n;
  vector<complex<double> > poly;
  for (long long(i) = (0); (i) < (n); ++i) {
    double a, b;
    cin >> a >> b;
    poly.push_back(complex<double>(a, b));
  }
  for (long long(i) = (0); (i) < (n); ++i) {
    int tmp = ccw(poly[i], poly[(i + 1) % n], poly[(i + 2) % n]);
    if (tmp != 1 && tmp != -2) {
      cout << 0 << endl;
      return 0;
    }
  }
  cout << 1 << endl;
  return 0;
}
