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-10;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, 1, 0, -1};
const int INF = 1001001001;
const long long INFLL = 1001001001001001001ll;
bool eq(double a, double b) { return (fabs(a - b) <= EPS); }
bool neq(double a, double b) { return (!eq(a, b)); }
bool lt(double a, double b) { return (a - b < -EPS); }
bool leq(double a, double b) { return (lt(a, b) || eq(a, b)); }
bool gt(double a, double b) { return (a - b > +EPS); }
bool geq(double a, double b) { return (gt(a, b) || eq(a, b)); }
class Point {
 public:
  double x, y;
  Point(double x = 0, double y = 0) : x(x), y(y) {}
  Point operator+(Point p) { return Point(x + p.x, y + p.y); }
  Point operator-(Point p) { return Point(x - p.x, y - p.y); }
  Point operator*(double a) { return Point(x * a, y * a); }
  Point operator/(double a) { return Point(x / a, y / a); }
  Point operator*(const Point &a) {
    return Point(x * a.x - y * a.y, x * a.y + y * a.x);
  }
  bool operator<(const Point &p) const {
    return (x != p.x ? x < p.x : y < p.y);
  }
  bool operator==(const Point &p) const {
    return (fabs(x - p.x) < EPS && fabs(y - p.y) < EPS);
  }
};
double norm(Point a) { return (a.x * a.x + a.y * a.y); }
double abs(Point a) { return (sqrt(norm(a))); }
double abs(Point a, Point b) { return (sqrt(norm(a - b))); }
double dot(Point a, Point b) { return (a.x * b.x + a.y * b.y); }
double cross(Point a, Point b) { return (a.x * b.y - a.y * b.x); }
double atan(Point a) { return atan2(a.y, a.x); }
bool sortX(Point a, Point b) {
  return (a.x != b.x ? lt(a.x, b.x) : lt(a.y, b.y));
}
bool sortY(Point a, Point b) {
  return (a.y != b.y ? lt(a.y, b.y) : lt(a.x, b.x));
}
Point baseP;
bool sortT(Point a, Point b) { return (gt(cross(a - baseP, b - baseP), 0)); }
int ccw(Point p0, Point p1, Point p2) {
  Point a = p1 - p0;
  Point 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);
}
vector<Point> normalize(vector<Point> &v) {
  int pt = 0;
  for (int i = 1; i < v.size(); i++) {
    if (v[pt].y > v[i].y || (v[pt].y == v[i].y && v[pt].x > v[i].x)) {
      pt = i;
    }
  }
  swap(v[pt], v[0]);
  baseP = v[0];
  sort(v.begin() + 1, v.end(), sortT);
  return (v);
}
vector<Point> conhel(vector<Point> &ps) {
  sort(ps.begin(), ps.end());
  int k = 0, n = (int)ps.size();
  vector<Point> qs(n * 2);
  for (int i = 0; i < n; i++) {
    while (k > 1 && cross(qs[k - 1] - qs[k - 2], ps[i] - qs[k - 1]) < EPS) k--;
    qs[k++] = ps[i];
  }
  for (int i = n - 2, t = k; i >= 0; i--) {
    while (k > t && cross(qs[k - 1] - qs[k - 2], ps[i] - qs[k - 1]) < EPS) k--;
    qs[k++] = ps[i];
  }
  qs.resize(k - 1);
  return (qs);
}
double getArea(vector<Point> t) {
  double ans = 0.0;
  for (unsigned int i = 0; i < t.size(); i++)
    ans += cross(t[i], t[(i + 1) % t.size()]);
  return (fabs(ans) / 2);
}
bool isIntersectLL(Point p1, Point p2, Point p3, Point p4) {
  return (abs(cross(p2 - p1, p4 - p3)) > EPS ||
          abs(cross(p2 - p1, p4 - p1)) < EPS);
}
bool isIntersectLS(Point p1, Point p2, Point p3, Point p4) {
  return (cross(p2 - p1, p3 - p1) * cross(p2 - p1, p4 - p1) < EPS);
}
bool isIntersectLP(Point p1, Point p2, Point p) {
  return (neq(abs(ccw(p1, p2, p)), 1));
}
bool isIntersectSS(Point p1, Point p2, Point p3, Point p4) {
  return (ccw(p1, p2, p3) * ccw(p1, p2, p4) <= 0 &&
          ccw(p3, p4, p1) * ccw(p3, p4, p2) <= 0);
}
bool isIntersectSP(Point p1, Point p2, Point p) {
  return (eq(ccw(p1, p2, p), 0));
}
bool isInsideCP(Point c, double r, Point p) { return (leq(abs(c - p), r)); }
bool isInsideCC(Point c1, double r1, Point c2, double r2) {
  return (leq(abs(c1 - c2), r1 + r2) && geq(abs(c1 - c2), abs(r1 - r2)));
}
bool isInsidePolyP(vector<Point> gon, Point p) {
  for (int i = 0; i < gon.size(); i++) {
    if (ccw(gon[i], gon[(i + 1) % gon.size()], p) == -1) return (false);
  }
  return (true);
}
Point projection(Point p1, Point p2, Point p3) {
  double t = dot(p3 - p1, p2 - p1) / norm(p2 - p1);
  return (p1 + (p2 - p1) * t);
}
Point reflection(Point p1, Point p2, Point p3) {
  return (p3 + (projection(p1, p2, p3) - p3) * 2);
}
double distanceLP(Point p1, Point p2, Point p) {
  return (abs(p - projection(p1, p2, p)));
}
double distanceLL(Point l1, Point l2, Point m1, Point m2) {
  return (isIntersectLL(l1, l2, m1, m2) ? 0 : distanceLP(l1, l2, m1));
}
double distanceLS(Point l1, Point l2, Point s1, Point s2) {
  if (isIntersectLS(l1, l2, s1, s2)) return (0);
  return (min(distanceLP(l1, l2, s1), distanceLP(l1, l2, s2)));
}
double distanceSP(Point s1, Point s2, Point p) {
  Point r = projection(s1, s2, p);
  if (isIntersectSP(s1, s2, r)) return (abs(r - p));
  return (min(abs(s1 - p), abs(s2 - p)));
}
double distanceSS(Point s1, Point s2, Point t1, Point t2) {
  if (isIntersectSS(s1, s2, t1, t2)) return (0);
  return (min(min(distanceSP(s1, s2, t1), distanceSP(s1, s2, t2)),
              min(distanceSP(t1, t2, s1), distanceSP(t1, t2, s2))));
}
Point interPointLL(Point a1, Point a2, Point b1, Point b2) {
  double d = cross(a2 - a1, b2 - b1);
  if (abs(d) < EPS) throw "Segment is Paralell!";
  Point a = a2 - a1, b = b2 - b1;
  double t = cross(b, b1 - a1) / cross(b, a);
  return (a1 + a * t);
}
vector<Point> interPointCC(Point c1, double r1, Point c2, double r2) {
  vector<Point> res;
  if (abs(c1 - c2) < EPS) return (vector<Point>());
  double d = abs(c1 - c2);
  double rc = (d * d + r1 * r1 - r2 * r2) / (2 * d);
  double rs = sqrt(r1 * r1 - rc * rc);
  Point diff = (c2 - c1) / d;
  res.push_back(Point(c1 + diff * Point(rc, rs)));
  res.push_back(Point(c1 + diff * Point(rc, -rs)));
  return (res);
}
vector<Point> crosspointCL(Point a, double ra, Point b1, Point b2) {
  vector<Point> res;
  double dist = distanceLP(b1, b2, a);
  if (leq(dist, ra)) {
    Point s = projection(b1, b2, a);
    dist = sqrt(ra * ra - dist * dist);
    Point t = (b2 - b1) / abs(b2 - b1);
    res.push_back(s + t * dist);
    res.push_back(s - t * dist);
  }
  return (res);
}
Point unitVector(Point t) {
  double u = abs(t);
  return (Point(t.x / u, t.y / u));
}
Point normalVector(Point p, Point a, Point b) {
  Point v = unitVector(b - a);
  v = cross(v, p - a) > 0 ? Point(v.y, -v.x) : Point(-v.y, v.x);
  return v * distanceLP(p, a, b);
}
double getCos(Point a, Point b) { return (dot(a, b) / (abs(a) * abs(b))); }
double getSin(Point a, Point b) {
  double t = getCos(a, b);
  return (sqrt(1.0 - t * t));
}
double getArg(Point v) { return (atan2(v.y, v.x)); }
Point rotate(Point t, Point p, double r) {
  double ta = cos(r) * (t.x - p.x) - sin(r) * (t.y - p.y) + p.x;
  double tb = sin(r) * (t.x - p.x) + cos(r) * (t.y - p.y) + p.y;
  return (Point(ta, tb));
}
int main() {
  int n;
  scanf("%d", &n);
  vector<Point> p(n);
  for (int i = 0; i < n; i++) {
    scanf("%lf %lf", &p[i].x, &p[i].y);
  }
  for (int i = 0; i < n; i++) {
    Point prev = p[(i - 1 + n) % n];
    Point next = p[(i + 1) % n];
    if (ccw(prev, p[i], next) != 1) return (!printf("0\n"));
  }
  printf("1\n");
  return (0);
}
