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;
double toRadian(double deg) { return ((deg * acos(-1.0)) / 180.0); }
double toDegree(double radian) { return ((radian * 180.0) / acos(-1.0)); }
double handleNegZero(double x) { return ((abs(x) < 1e-9) ? 0.0 : x); }
struct point_i {
  int x, y;
  point_i() { x = y = 0; }
  point_i(int _x, int _y) : x(_x), y(_y) {}
};
struct Point {
  double x, y;
  Point() {}
  Point(double _x, double _y) : x(_x), y(_y) {}
  bool operator<(Point other) const {
    if (fabs(x - other.x) > 1e-9) return x < other.x;
    return y < other.y;
  }
  bool operator==(Point other) const {
    return ((fabs(x - other.x) < 1e-9) && (fabs(y - other.y) < 1e-9));
  }
};
double pointDistaceSquared2D(Point a, Point b) {
  return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
}
double dist(Point a, Point b) { return sqrt(pointDistaceSquared2D(a, b)); }
Point rotate(Point p, double theta) {
  double rad = toRadian(theta);
  return Point(p.x * cos(rad) - p.y * sin(rad),
               p.x * sin(rad) + p.y * cos(rad));
}
struct line {
  double a, b, c;
};
void pointsToLine(Point p1, Point p2, line &l) {
  if (fabs(p1.x - p2.x) < 1e-9) {
    l.a = 1.0;
    l.b = 0.0;
    l.c = -p1.x;
  } else {
    l.a = -(double)(p1.y - p2.y) / (p1.x - p2.x);
    l.b = 1.0;
    l.c = -(double)(l.a * p1.x) - p1.y;
  }
}
bool areParallel(line l1, line l2) {
  return (fabs(l1.a - l2.a) < 1e-9) && (fabs(l1.b - l2.b) < 1e-9);
}
bool areSame(line l1, line l2) {
  return areParallel(l1, l2) && (fabs(l1.c - l2.c) < 1e-9);
}
bool areIntersect(line l1, line l2, Point &p) {
  if (areParallel(l1, l2)) return false;
  p.x = (l2.b * l1.c - l1.b * l2.c) / (l2.a * l1.b - l1.a * l2.b);
  if (fabs(l1.b) > 1e-9)
    p.y = -(l1.a * p.x + l1.c);
  else
    p.y = -(l2.a * p.x + l2.c);
  return true;
}
bool onSegment(Point p, Point q, Point r) {
  if (q.x <= max(p.x, r.x) && q.x >= min(p.x, r.x) && q.y <= max(p.y, r.y) &&
      q.y >= min(p.y, r.y))
    return true;
  return false;
}
int orientation(Point p, Point q, Point r) {
  int val = (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);
  if (val == 0) return 0;
  return (val > 0) ? 1 : 2;
}
bool LineSegmentIntersect(Point p1, Point q1, Point p2, Point q2) {
  int o1 = orientation(p1, q1, p2);
  int o2 = orientation(p1, q1, q2);
  int o3 = orientation(p2, q2, p1);
  int o4 = orientation(p2, q2, q1);
  if (o1 != o2 && o3 != o4) return true;
  if (o1 == 0 && onSegment(p1, p2, q1)) return true;
  if (o2 == 0 && onSegment(p1, q2, q1)) return true;
  if (o3 == 0 && onSegment(p2, p1, q2)) return true;
  if (o4 == 0 && onSegment(p2, q1, q2)) return true;
  return false;
}
struct vec {
  double x, y;
  vec() {}
  vec(double _x, double _y) : x(_x), y(_y) {}
};
vec toVec(Point a, Point b) { return vec(b.x - a.x, b.y - a.y); }
vec scale(vec v, double s) { return vec(v.x * s, v.y * s); }
Point translate(Point p, vec v) { return Point(p.x + v.x, p.y + v.y); }
double dot(vec a, vec b) { return (a.x * b.x + a.y * b.y); }
double norm_sq(vec v) { return v.x * v.x + v.y * v.y; }
double distToLine(Point p, Point a, Point b, Point &c) {
  vec ap = toVec(a, p), ab = toVec(a, b);
  double u = dot(ap, ab) / norm_sq(ab);
  c = translate(a, scale(ab, u));
  return dist(p, c);
}
double distToLineSegment(Point p, Point a, Point b, Point &c) {
  vec ap = toVec(a, p), ab = toVec(a, b);
  double u = dot(ap, ab) / norm_sq(ab);
  if (u < 0.0) {
    c = Point(a.x, a.y);
    return dist(p, a);
  }
  if (u > 1.0) {
    c = Point(b.x, b.y);
    return dist(p, b);
  }
  return distToLine(p, a, b, c);
}
double angle(Point a, Point o, Point b) {
  vec oa = toVec(o, a), ob = toVec(o, b);
  return acos(dot(oa, ob) / sqrt(norm_sq(oa) * norm_sq(ob)));
}
double cross(vec a, vec b) { return a.x * b.y - a.y * b.x; }
bool ccw(Point p, Point q, Point r) {
  return cross(toVec(p, q), toVec(p, r)) > 0;
}
bool collinear(Point p, Point q, Point r) {
  return fabs(cross(toVec(p, q), toVec(p, r))) < 1e-9;
}
double trianglePerimeter(double a, double b, double c) {
  return (a + b + c) * 0.5;
}
double triangleArea(double b, double h) { return (b * h) * 0.5; }
double triangleArea(double a, double b, double c) {
  double s = trianglePerimeter(a, b, c);
  return sqrt(s * (s - a) * (s - b) * (s - c));
}
double triangleAngle(double a, double b, double c) {
  double nume = a * a + b * b - c * c;
  double denom = 2.0 * a * b;
  return acos(nume / denom);
}
int insideCircle(point_i p, point_i c, int r) {
  int dx = p.x - c.x, dy = p.y - c.y;
  int Euc = dx * dx + dy * dy, rSq = r * r;
  return Euc < rSq ? 0 : Euc == rSq ? 1 : 2;
}
bool circle2PtsRad(Point p1, Point p2, double r, Point &c) {
  double d2 = (p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y);
  double det = r * r / d2 - 0.25;
  if (det < 0.0) return false;
  double h = sqrt(det);
  c.x = (p1.x + p2.x) * 0.5 + (p1.y - p2.y) * h;
  c.y = (p1.y + p2.y) * 0.5 + (p2.x - p1.x) * h;
  return true;
}
double circleCircumference(double r) { return 2.0 * acos(-1.0) * r; }
double circleArea(double r) { return acos(-1.0) * r * r; }
double circleSectorArea(double r, double theta) {
  return (circleArea(r) * theta) / 360.0;
}
double inCircleRadius(double a, double b, double c) {
  double area = triangleArea(a, b, c);
  double s = trianglePerimeter(a, b, c);
  return (area / s);
}
double circumCircleRadius(double a, double b, double c) {
  double A = triangleAngle(b, c, a);
  double d = a / sin(A);
  return d *= 0.5;
}
double coneArea(double h, double r) { return (acos(-1.0) * r * r * h) / 3.0; }
double coneFrustumArea(double R, double r, double h) {
  return ((R * R + R * r + r * r) * acos(-1.0) * h) / 3.0;
}
double perimeter(const vector<Point> &P) {
  double result = 0.0;
  for (int i = 0; i < (int)P.size() - 1; i++) result += dist(P[i], P[i + 1]);
  return result;
}
double area(const vector<Point> &P) {
  double result = 0.0, x1, y1, x2, y2;
  for (int i = 0; i < (int)P.size() - 1; i++) {
    x1 = P[i].x;
    x2 = P[i + 1].x;
    y1 = P[i].y;
    y2 = P[i + 1].y;
    result += (x1 * y2 - x2 * y1);
  }
  return fabs(result) / 2.0;
}
bool isConvex(const vector<Point> &P) {
  int sz = (int)P.size();
  if (sz <= 3) return false;
  bool isLeft = ccw(P[0], P[1], P[2]);
  for (int i = 1; i < sz - 1; i++)
    if (ccw(P[i], P[i + 1], P[(i + 2) == sz ? 1 : i + 2]) != isLeft)
      return false;
  return true;
}
bool inPolygon(Point pt, const vector<Point> &P) {
  if ((int)P.size() == 0) return false;
  double sum = 0;
  for (int i = 0; i < (int)P.size() - 1; i++) {
    if (ccw(pt, P[i], P[i + 1]))
      sum += angle(P[i], pt, P[i + 1]);
    else
      sum -= angle(P[i], pt, P[i + 1]);
  }
  return fabs(fabs(sum) - 2 * acos(-1.0)) < 1e-9;
}
Point lineIntersectSeg(Point p, Point q, Point A, Point B) {
  double a = B.y - A.y;
  double b = A.x - B.x;
  double c = B.x * A.y - A.x * B.y;
  double u = fabs(a * p.x + b * p.y + c);
  double v = fabs(a * q.x + b * q.y + c);
  return Point((p.x * v + q.x * u) / (u + v), (p.y * v + q.y * u) / (u + v));
}
vector<Point> cutPolygon(Point a, Point b, const vector<Point> &Q) {
  vector<Point> P;
  for (int i = 0; i < (int)Q.size(); i++) {
    double left1 = cross(toVec(a, b), toVec(a, Q[i])), left2 = 0;
    if (i != (int)Q.size() - 1) left2 = cross(toVec(a, b), toVec(a, Q[i + 1]));
    if (left1 > -1e-9) P.push_back(Q[i]);
    if (left1 * left2 < -1e-9)
      P.push_back(lineIntersectSeg(Q[i], Q[i + 1], a, b));
  }
  if (!P.empty() && !(P.back() == P.front())) P.push_back(P.front());
  return P;
}
int main() {
  int n;
  double x, y;
  vector<Point> v;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%lf %lf", &x, &y);
    v.push_back(Point(x, y));
  }
  v.push_back(v[0]);
  printf("%d\n", isConvex(v));
  return 0;
}
