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 int INF = 1 << 29;
const double EPS = 1e-9;
const int dx[] = {1, 0, -1, 0}, dy[] = {0, -1, 0, 1};
namespace std {
bool operator<(const complex<double> &lhs, const complex<double> &rhs) {
  if (real(lhs) == real(rhs)) {
    return imag(lhs) < imag(rhs);
  } else {
    return real(lhs) < real(rhs);
  }
}
}  // namespace std
double dist_linesegment_and_point(complex<double> a1, complex<double> a2,
                                  complex<double> b);
double vector_length(complex<double> a) { return abs(a); }
double point_distance(complex<double> a, complex<double> b) {
  return abs(a - b);
}
complex<double> unit_vector(complex<double> a) { return a / abs(a); }
pair<complex<double>, complex<double> > normal_vector(complex<double> a) {
  complex<double> n1 = a * complex<double>(0, 1);
  complex<double> n2 = a * complex<double>(0, -1);
  return make_pair(n1, n2);
}
bool point_eq(complex<double> a, complex<double> b) { return abs(a - b) < EPS; }
double dot(complex<double> a, complex<double> b) { return real(conj(a) * b); }
double cross(complex<double> a, complex<double> b) { return imag(conj(a) * b); }
double radian(double angle) { return angle / 180.0 * M_PI; }
double degree(double radian) { return radian * 180.0 / M_PI; }
bool is_intersected_linesegment(complex<double> a1, complex<double> a2,
                                complex<double> b1, complex<double> b2) {
  if (max(a1.real(), a2.real()) + EPS < min(b1.real(), b2.real())) return false;
  if (max(b1.real(), b2.real()) + EPS < min(a1.real(), a2.real())) return false;
  if (max(a1.imag(), a2.imag()) + EPS < min(b1.imag(), b2.imag())) return false;
  if (max(b1.imag(), b2.imag()) + EPS < min(a1.imag(), a2.imag())) return false;
  return (cross(a2 - a1, b1 - a1) * cross(a2 - a1, b2 - a1) < EPS) and
         (cross(b2 - b1, a1 - b1) * cross(b2 - b1, a2 - b1) < EPS);
}
complex<double> intersection_point_linesegment(complex<double> a1,
                                               complex<double> a2,
                                               complex<double> b1,
                                               complex<double> b2) {
  if (a1 == b1 or a1 == b2) return a1;
  if (a2 == b1 or a2 == b2) return a2;
  complex<double> b = b2 - b1;
  double d1 = abs(cross(b, a1 - b1));
  double d2 = abs(cross(b, a2 - b1));
  double t = d1 / (d1 + d2);
  return a1 + (a2 - a1) * t;
}
double dist_linesegment_and_linesegment(complex<double> a1, complex<double> a2,
                                        complex<double> b1,
                                        complex<double> b2) {
  if (is_intersected_linesegment(a1, a2, b1, b2)) {
    return 0;
  }
  return min(min(dist_linesegment_and_point(a1, a2, b1),
                 dist_linesegment_and_point(a1, a2, b2)),
             min(dist_linesegment_and_point(b1, b2, a1),
                 dist_linesegment_and_point(b1, b2, a2)));
}
bool is_orthogonal(complex<double> a1, complex<double> a2, complex<double> b1,
                   complex<double> b2) {
  return abs(dot(a1 - a2, b1 - b2)) < EPS;
}
bool is_parallel(complex<double> a1, complex<double> a2, complex<double> b1,
                 complex<double> b2) {
  return abs(cross(a2 - a1, b2 - b1)) < EPS;
}
bool is_intersected_line(complex<double> a1, complex<double> a2,
                         complex<double> b1, complex<double> b2) {
  return not is_parallel(a1, a2, b1, b2);
}
complex<double> intersection_line(complex<double> a1, complex<double> a2,
                                  complex<double> b1, complex<double> b2) {
  complex<double> a = a2 - a1, b = b2 - b1;
  return a1 + a * cross(b, b1 - a1) / cross(b, a);
}
double dist_line_and_point(complex<double> a1, complex<double> a2,
                           complex<double> b) {
  return abs(cross(a2 - a1, b - a1)) / abs(a2 - a1);
}
double dist_linesegment_and_point(complex<double> a1, complex<double> a2,
                                  complex<double> b) {
  if (dot(a2 - a1, b - a1) < EPS) return abs(b - a1);
  if (dot(a1 - a2, b - a2) < EPS) return abs(b - a2);
  return dist_line_and_point(a1, a2, b);
}
complex<double> nearest_point_line_and_point(complex<double> a1,
                                             complex<double> a2,
                                             complex<double> b) {
  return a1 + (a2 - a1) * dot((a2 - a1), (b - a1)) / norm(a2 - a1);
}
complex<double> nearest_point_linesegment_and_point(complex<double> a1,
                                                    complex<double> a2,
                                                    complex<double> b) {
  if (dot(a2 - a1, b - a1) < EPS) return a1;
  if (dot(a1 - a2, b - a2) < EPS) return a2;
  return nearest_point_line_and_point(a1, a2, b);
}
bool is_cross_linesegment_and_circle(complex<double> c, double r,
                                     complex<double> a1, complex<double> a2) {
  return (dist_linesegment_and_point(a1, a2, c) < r + EPS and
          (r < abs(c - a1) + EPS or r < abs(c - a2) + EPS));
}
int ccw(complex<double> p0, complex<double> p1, complex<double> p2) {
  complex<double> a = p1 - p0;
  complex<double> b = p2 - p0;
  if (cross(a, b) > EPS) return (+1);
  if (cross(a, b) < -EPS) return (-1);
  if (dot(a, b) < -EPS) return (+2);
  if (norm(a) < norm(b)) return (-2);
  return (0);
}
bool is_inner_point_vertex(const vector<complex<double> > &ps,
                           complex<double> a) {
  int cc = ccw(ps[0], ps[1], a);
  if (not(cc == 1 or cc == -1)) return false;
  for (size_t i = 0; i < ps.size(); i++) {
    if (cc != ccw(ps[i], ps[(i + 1) % ps.size()], a)) return false;
  }
  return true;
}
bool is_inner_point_vertex_or_line(const vector<complex<double> > &ps,
                                   complex<double> a) {
  for (size_t i = 0; i < ps.size(); i++) {
    if (dist_linesegment_and_point(ps[i], ps[(i + 1) % ps.size()], a) < EPS) {
      return true;
    }
  }
  return is_inner_point_vertex(ps, a);
}
vector<complex<double> > convex_hull(vector<complex<double> > ps) {
  int n = ps.size();
  int 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 and 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 and ccw(ch[k - 2], ch[k - 1], ps[i]) <= 0) --k;
  }
  ch.resize(k - 1);
  return ch;
}
double convex_diameter(const vector<complex<double> > &pts) {
  const int n = pts.size();
  int is = 0, js = 0;
  for (int i = 1; i < n; i++) {
    if (pts[i].imag() > pts[is].imag()) is = i;
    if (pts[i].imag() < pts[js].imag()) js = i;
  }
  double maxd = abs(pts[is] - pts[js]);
  int i, j, maxi, maxj;
  i = maxi = is;
  j = maxj = js;
  do {
    if (cross(pts[(i + 1) % n] - pts[i], pts[(j + 1) % n] - pts[j]) >= 0) {
      j = (j + 1) % n;
    } else {
      i = (i + 1) % n;
    }
    if (abs(pts[i] - pts[j]) > maxd) {
      maxd = abs(pts[i] - pts[j]);
      maxi = i;
      maxj = j;
    }
  } while (not(i == is and j == js));
  return maxd;
}
vector<complex<double> > circles_point(complex<double> c1, double r1,
                                       complex<double> c2, double r2) {
  double d = abs(c1 - c2);
  double s = (r1 + r2 + d) / 2;
  double S = sqrt(s * (s - r1) * (s - r2) * (s - d));
  double h = 2 * S / d;
  complex<double> v = (c2 - c1) / (abs(c2 - c1));
  double m = sqrt(r1 * r1 - h * h);
  vector<complex<double> > ret;
  ret.push_back(c1 + m * v + h * v * complex<double>(0, 1));
  ret.push_back(c1 + m * v - h * v * complex<double>(0, 1));
  return ret;
}
double triangle_area(complex<double> a, complex<double> b, complex<double> c) {
  return cross(b - a, c - a) / 2;
}
double vertex_area(vector<complex<double> > v) {
  double ret = 0;
  for (int i = 1; i < v.size() - 1; i++) {
    ret += triangle_area(v[0], v[i], v[i + 1]);
  }
  return ret;
}
double area_vertex(const vector<complex<double> > &g) {
  double S = 0;
  for (int i = 0; i < g.size(); i++) {
    S += (cross(g[i], g[(i + 1) % g.size()]));
  }
  return abs(S / 2.0);
}
int Circles_Intersection(complex<double> a, double r1, complex<double> b,
                         double r2) {
  double dp = abs(a - b);
  double dr = r1 + r2;
  if (dp > dr) {
    return 0;
  } else if (dp + r1 < r2) {
    return -2;
  } else if (dp + r2 < r1) {
    return 2;
  } else if (dp <= dr) {
    return 1;
  }
  return -100;
}
complex<double> projection(complex<double> p1, complex<double> p2,
                           complex<double> p3) {
  double t = dot(p3 - p1, p2 - p1) / norm(p2 - p1);
  return (p1 + (p2 - p1) * t);
}
complex<double> reflection(complex<double> p1, complex<double> p2,
                           complex<double> p3) {
  return (p3 + 2.0 * (projection(p1, p2, p3) - p3));
}
bool isconvex(const vector<complex<double> > &P) {
  for (int i = 0; i < P.size(); ++i)
    if (ccw(P[(i + P.size() - 1) % P.size()], P[(i) % P.size()],
            P[(i + 1) % P.size()]) > 0)
      return false;
  return true;
}
int main() {
  double x1, y1, x2, y2, x3, y3, x4, y4;
  int q;
  vector<complex<double> > g;
  cin >> q;
  for (int i = 0; i < q; i++) {
    cin >> x1 >> y1;
    complex<double> a(x1, y1);
    g.push_back(a);
  }
  if (isconvex(g)) {
    cout << 1 << endl;
  } else {
    cout << 0 << endl;
  }
  return 0;
}
