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 kEps = 1e-10;
const double kInf = 1e15;
int dcmp(double x) {
  if (fabs(x) < kEps) return 0;
  return x < 0 ? -1 : 1;
}
struct Vector {
  Vector() {}
  Vector(double x, double y) : x(x), y(y) {}
  Vector(const Vector &v) : x(v.x), y(v.y){};
  double x, y;
  double Norm() const { return hypot(x, y); }
  double NormSquared() const { return x * x + y * y; }
  Vector Normalize() const { return *this / this->Norm(); }
  Vector operator-() const { return Vector(-x, -y); }
  Vector operator+(const Vector &rhs) const {
    return Vector(x + rhs.x, y + rhs.y);
  }
  Vector operator-(const Vector &rhs) const { return *this + (-rhs); }
  Vector operator*(const double rhs) const { return Vector(rhs * x, rhs * y); }
  Vector operator/(const double rhs) const { return *this * (1.0 / rhs); }
  double Dot(const Vector &rhs) const { return x * rhs.x + y * rhs.y; }
  double Cross(const Vector &rhs) const { return x * rhs.y - y * rhs.x; }
  bool operator==(const Vector &rhs) const {
    return dcmp(x - rhs.x) == 0 && dcmp(y - rhs.y) == 0;
  }
  bool operator<(const Vector &rhs) const {
    return dcmp(x - rhs.x) < 0 || (dcmp(x - rhs.x) == 0 && dcmp(y - rhs.y) < 0);
  }
};
struct Point {
  Point() {}
  Point(double x, double y) : x(x), y(y) {}
  Point(const Point &p) : x(p.x), y(p.y){};
  double x, y;
  Point operator-() { return Point(-x, -y); }
  Point operator+(const Vector &rhs) const {
    return Point(x + rhs.x, y + rhs.y);
  }
  Point operator-(const Vector &rhs) const { return *this + (-rhs); }
  bool operator==(const Point &rhs) const {
    return dcmp(x - rhs.x) == 0 && dcmp(y - rhs.y) == 0;
  }
  bool operator<(const Point &rhs) const {
    return dcmp(x - rhs.x) < 0 || (dcmp(x - rhs.x) == 0 && dcmp(y - rhs.y) < 0);
  }
};
struct Line {
  Line() {}
  Line(const Point &p1, const Point &p2) : p1(p1), p2(p2) {
    a = p2.y - p1.y;
    b = p1.x - p2.x;
    c = (p2.x - p1.x) * p1.y + (p1.y - p2.y) * p1.x;
    if (dcmp(p2.x - p1.x) == 0) {
      k = kInf;
    } else {
      k = (p2.y - p1.y) / (p2.x - p1.x);
    }
  }
  Line(double x1, double y1, double x2, double y2) : p1(x1, y1), p2(x2, y2) {
    a = y2 - y1;
    b = x1 - x2;
    c = (p2.x - p1.x) * p1.y + (p1.y - p2.y) * p1.x;
    if (dcmp(x2 - x1) == 0) {
      k = kInf;
    } else {
      k = (y2 - y1) / (x2 - x1);
    }
  }
  Line(const Line &l);
  Point p1, p2;
  double a, b, c;
  double k;
};
ostream &operator<<(ostream &os, const Point &p) {
  os << p.x << " " << p.y;
  return os;
}
ostream &operator<<(ostream &os, const Vector &v) {
  os << v.x << " " << v.y;
  return os;
}
ostream &operator<<(ostream &os, const Line &l) {
  os << l.p1.x << " " << l.p1.y << " " << l.p2.x << " " << l.p2.y;
  return os;
}
int Direction(const Point &p0, const Point &p1, const Point &p2) {
  Vector v1(p1.x - p0.x, p1.y - p0.y);
  Vector v2(p2.x - p0.x, p2.y - p0.y);
  return dcmp(v2.Cross(v1));
}
int main(int argc, char const *argv[]) {
  int n;
  double x0, y0, x1, y1;
  int is_convex = 1;
  int direction = 0;
  cin >> n;
  cin >> x0 >> y0;
  cin >> x1 >> y1;
  Point p0(x0, y0);
  Point p1(x1, y1);
  for (unsigned i = 0; i < n - 2; ++i) {
    double x2, y2;
    cin >> x2 >> y2;
    Point p2(x2, y2);
    auto direction_now = Direction(p0, p1, p2);
    if (direction_now == 0) {
      is_convex = 0;
      break;
    }
    if (direction == 0) {
      direction = direction_now;
    } else {
      if (direction != direction_now) {
        is_convex = 0;
        break;
      }
    }
    p1 = p2;
  }
  cout << is_convex << "\n";
  return 0;
}
