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>
const int INF = 2000000000;
using namespace std;
struct Segment {
  complex<double> p1, p2;
};
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 a.real() == b.real() && a.imag() == b.imag();
}
}  // namespace std
class Circle {
 public:
  complex<double> c;
  double r;
  Circle(complex<double> c = complex<double>(), double r = 0.0) : c(c), r(r) {}
};
int ccw(complex<double>, complex<double>, complex<double>);
bool EQ(double a, double b) { return (abs(a - b) < (1e-10)); }
bool EQV(complex<double> a, complex<double> b) {
  return (EQ(a.real(), b.real()) && EQ(a.imag(), b.imag()));
}
double dot(complex<double> a, complex<double> b) {
  return (a.real() * b.real() + a.imag() * b.imag());
}
double cross(complex<double> a, complex<double> b) {
  return (a.real() * b.imag() - a.imag() * b.real());
}
bool isOrthogonal(complex<double> a1, complex<double> a2, complex<double> b1,
                  complex<double> b2) {
  return EQ(dot(a1 - a2, b1 - b2), 0.0);
}
bool isOrthogonal(Segment s1, Segment s2) {
  return isOrthogonal(s1.p1, s1.p2, s2.p1, s2.p2);
}
bool isParallel(complex<double> a1, complex<double> a2, complex<double> b1,
                complex<double> b2) {
  return EQ(cross(a1 - a2, b1 - b2), 0.0);
}
bool isParallel(Segment s1, Segment s2) {
  return isParallel(s1.p1, s1.p2, s2.p1, s2.p2);
}
bool isPointOnLine(complex<double> a, complex<double> b, complex<double> c) {
  return EQ(cross(b - a, c - a), 0.0);
}
bool isPointOnLine(Segment s, complex<double> c) {
  return isPointOnLine(s.p1, s.p2, c);
}
double distanceLPoint(complex<double> a, complex<double> b, complex<double> c) {
  return abs(cross(b - a, c - a)) / abs(b - a);
}
double distanceLPoint(Segment s, complex<double> c) {
  return distanceLPoint(s.p1, s.p2, c);
}
double distanceLsPoint(complex<double> a, complex<double> b,
                       complex<double> c) {
  if (dot(b - a, c - a) < (1e-10)) return abs(c - a);
  if (dot(a - b, c - b) < (1e-10)) return abs(c - b);
  return abs(cross(b - a, c - a)) / abs(b - a);
}
double distanceLsPoint(Segment s, complex<double> c) {
  return distanceLsPoint(s.p1, s.p2, c);
}
bool isIntersectedLs(complex<double> a1, complex<double> a2, complex<double> b1,
                     complex<double> b2) {
  return (ccw(a1, a2, b1) * ccw(a1, a2, b2) <= 0 &&
          ccw(b1, b2, a1) * ccw(b1, b2, a2) <= 0);
}
bool isIntersectedLs(Segment s1, Segment s2) {
  return isIntersectedLs(s1.p1, s1.p2, s2.p1, s2.p2);
}
complex<double> intersectionLs(complex<double> a1, complex<double> a2,
                               complex<double> b1, complex<double> b2) {
  complex<double> base = b2 - b1;
  double d1 = abs(cross(base, a1 - b1));
  double d2 = abs(cross(base, a2 - b1));
  double t = d1 / (d1 + d2);
  return complex<double>(a1 + (a2 - a1) * t);
}
complex<double> intersectionLs(Segment s1, Segment s2) {
  return intersectionLs(s1.p1, s1.p2, s2.p1, s2.p2);
}
bool isIntersectedL(complex<double> a1, complex<double> a2, complex<double> b1,
                    complex<double> b2) {
  return !EQ(cross(a1 - a2, b1 - b2), 0.0);
}
bool isIntersectedL(Segment l1, Segment l2) {
  return isIntersectedL(l1.p1, l1.p2, l2.p1, l2.p2);
}
complex<double> intersectionL(complex<double> a1, complex<double> a2,
                              complex<double> b1, complex<double> b2) {
  complex<double> a = a2 - a1;
  complex<double> b = b2 - b1;
  return a1 + a * cross(b, b1 - a1) / cross(b, a);
}
complex<double> intersectionL(Segment l1, Segment l2) {
  return intersectionL(l1.p1, l1.p2, l2.p1, l2.p2);
}
double distanceLL(Segment s1, Segment s2) {
  if (isIntersectedLs(s1.p1, s1.p2, s2.p1, s2.p2)) return 0.0;
  return min(min(distanceLsPoint(s1.p1, s1.p2, s2.p1),
                 distanceLsPoint(s1.p1, s1.p2, s2.p2)),
             min(distanceLsPoint(s2.p1, s2.p2, s1.p1),
                 distanceLsPoint(s2.p1, s2.p2, s1.p2)));
}
complex<double> project(Segment s, complex<double> p) {
  complex<double> base = s.p2 - s.p1;
  double r = dot(p - s.p1, base) / norm(base);
  return complex<double>(s.p1 + base * r);
}
complex<double> reflect(Segment s, complex<double> p) {
  return complex<double>(p + (project(s, p) - p) * 2.0);
}
complex<double> rotation(complex<double> p, double angle) {
  double x, y;
  x = p.real() * cos(angle) - p.imag() * sin(angle);
  y = p.real() * sin(angle) + p.imag() * cos(angle);
  return complex<double>(x, y);
}
pair<complex<double>, complex<double> > getCrossPoints(Circle c, Segment l) {
  complex<double> pr = project(l, c.c);
  complex<double> e = (l.p2 - l.p1) / abs(l.p2 - l.p1);
  double base = sqrt(c.r * c.r - norm(pr - c.c));
  return make_pair(pr + e * base, pr - e * base);
}
double arg(complex<double> p) { return atan2(p.imag(), p.real()); }
complex<double> polar(double a, double r) {
  return complex<double>(cos(r) * a, sin(r) * a);
}
pair<complex<double>, complex<double> > getCrossPoints(Circle c1, Circle c2) {
  double d = abs(c1.c - c2.c);
  double a = acos((c1.r * c1.r + d * d - c2.r * c2.r) / (2 * c1.r * d));
  double t = arg(c2.c - c1.c);
  return make_pair(complex<double>(c1.c + polar(c1.r, t + a)),
                   complex<double>(c1.c + polar(c1.r, t - a)));
}
static const int IN = 2;
static const int ON = 1;
static const int OUT = 0;
int contains(vector<complex<double> > g, complex<double> p) {
  int n = g.size();
  bool x = false;
  for (int i = 0; i < (n); i++) {
    complex<double> a = g[i] - p, b = g[(i + 1) % n] - p;
    if (abs(cross(a, b)) < (1e-10) && dot(a, b) < (1e-10)) return ON;
    if (a.imag() > b.imag()) swap(a, b);
    if (a.imag() < (1e-10) && (1e-10) < b.imag() && cross(a, b) > (1e-10))
      x = not x;
  }
  return (x ? IN : OUT);
}
static const int COUNTER_CLOCKWISE = 1;
static const int CLOCKWISE = -1;
static const int ONLINE_BACK = 2;
static const int ONLINE_FRONT = -2;
static const int ON_SEGMENT = 0;
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) > (1e-10)) return COUNTER_CLOCKWISE;
  if (cross(a, b) < -(1e-10)) return CLOCKWISE;
  if (dot(a, b) < -(1e-10)) return ONLINE_BACK;
  if (abs(a) < abs(b)) return ONLINE_FRONT;
  return ON_SEGMENT;
}
vector<complex<double> > andrewScan(vector<complex<double> > s) {
  vector<complex<double> > u, l;
  if (s.size() < 3) return s;
  sort(s.begin(), s.end());
  u.emplace_back(s[0]);
  u.emplace_back(s[1]);
  l.emplace_back(s[s.size() - 1]);
  l.emplace_back(s[s.size() - 2]);
  for (int i = (2); i < (s.size()); i++) {
    for (int n = u.size(); n >= 2 && ccw(u[n - 2], u[n - 1], s[i]) != CLOCKWISE;
         n--) {
      u.pop_back();
    }
    u.emplace_back(s[i]);
  }
  for (int i = s.size() - 3; i >= 0; i--) {
    for (int n = l.size(); n >= 2 && ccw(l[n - 2], l[n - 1], s[i]) != CLOCKWISE;
         n--) {
      l.pop_back();
    }
    l.emplace_back(s[i]);
  }
  reverse(l.begin(), l.end());
  for (int i = u.size() - 2; i >= 1; i--) l.emplace_back(u[i]);
  return l;
}
double AreaOfTriangle(complex<double> a, complex<double> b, complex<double> c) {
  double w, x, y, z;
  w = b.real() - a.real();
  x = b.imag() - a.imag();
  y = c.real() - a.real();
  z = c.imag() - a.imag();
  return abs((w * z - x * y) / 2);
}
double areaOfPolygon(vector<complex<double> > g) {
  int n = g.size();
  double ret = 0.0;
  for (int i = 0; i < (n); i++) ret += cross(g[i], g[(i + 1) % n]);
  return abs(ret) / 2.0;
}
bool isConvex(vector<complex<double> > g) {
  int n = g.size();
  for (int i = 0; i < (n - 2); i++) {
    if (ccw(g[i], g[i + 1], g[i + 2]) == CLOCKWISE) return false;
  }
  return true;
}
int main() {
  int n;
  cin >> n;
  vector<complex<double> > g;
  for (int i = 0; i < (n); i++) {
    double a, b;
    cin >> a >> b;
    g.emplace_back(complex<double>{a, b});
  }
  cout << isConvex(g) << endl;
}
