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;
namespace geo {
bool comp(const complex<double>& l, const complex<double>& r) {
  return (l.real() == r.real()) ? l.imag() < r.imag() : l.real() < r.real();
}
typedef pair<complex<double>, complex<double> > L;
typedef pair<complex<double>, complex<double> > LS;
typedef pair<complex<double>, double> C;
const double EPS = 1e-8;
inline double dot(complex<double> a, complex<double> b) {
  return a.real() * b.real() + a.imag() * b.imag();
}
inline double cross(complex<double> a, complex<double> b) {
  return a.real() * b.imag() - a.imag() * b.real();
}
inline double ccw(complex<double> a, complex<double> b, complex<double> c) {
  return cross(b - a, c - a);
}
inline int sgn(complex<double> a, complex<double> b, complex<double> c) {
  if (cross(b - a, c - a) > EPS) return 1;
  if (cross(b - a, c - a) < -EPS) return -1;
  if (dot(b - a, c - a) < -EPS) return 2;
  if (dot(a - b, c - b) < -EPS) return -2;
  return 0;
}
inline double signed_distance_P_L(complex<double> p, L l) {
  complex<double>(a), (b);
  tie(a, b) = l;
  ;
  return ccw(a, b, p) / abs(b - a);
}
inline double distance_P_L(complex<double> p, L l) {
  return abs(signed_distance_P_L(p, l));
}
inline double distance_P_LS(complex<double> p, LS ls) {
  complex<double>(a), (b);
  tie(a, b) = ls;
  ;
  if (dot(b - a, p - a) < EPS) return abs(p - a);
  if (dot(a - b, p - b) < EPS) return abs(p - b);
  return abs(cross(b - a, p - a)) / abs(b - a);
}
inline bool is_L_L(L p, L q) {
  complex<double>(a), (b);
  tie(a, b) = p;
  ;
  complex<double>(c), (d);
  tie(c, d) = q;
  ;
  return abs(cross(a - b, c - d)) > EPS || abs(cross(a - b, d - b)) < EPS;
}
inline bool is_L_LS(L l, LS ls) {
  complex<double>(a), (b);
  tie(a, b) = l;
  ;
  complex<double>(c), (d);
  tie(c, d) = ls;
  ;
  return ccw(a, b, c) * ccw(a, b, d) < EPS;
}
inline bool is_LS_LS(LS p, LS q) {
  complex<double>(a), (b);
  tie(a, b) = p;
  ;
  complex<double>(c), (d);
  tie(c, d) = q;
  ;
  return sgn(a, b, c) * sgn(a, b, d) <= 0 && sgn(c, d, a) * sgn(c, d, b) <= 0;
}
inline double distance_LS_LS(LS p, LS q) {
  if (is_LS_LS(p, q)) return 0;
  return min({distance_P_LS(p.first, q), distance_P_LS(p.second, q),
              distance_P_LS(q.first, p), distance_P_LS(q.second, p)});
}
inline complex<double> cross_point_L_L(L p, L q) {
  complex<double>(a), (b);
  tie(a, b) = p;
  ;
  double d1 = signed_distance_P_L(a, q);
  double d2 = signed_distance_P_L(b, q);
  return (a * d2 - b * d1) / (d2 - d1);
}
inline bool is_C_C(C p, C q) {
  complex<double>(cp);
  double(rp);
  tie(cp, rp) = p;
  ;
  complex<double>(cq);
  double(rq);
  tie(cq, rq) = q;
  ;
  double d = abs(cp - cq);
  return abs(rp - rq) - d < EPS && rp + rq - d > -EPS;
}
inline LS cross_C_C(C p, C q) {
  complex<double>(cp);
  double(rp);
  tie(cp, rp) = p;
  ;
  complex<double>(cq);
  double(rq);
  tie(cq, rq) = q;
  ;
  double d = abs(cp - cq);
  double rc = (d * d + rp * rp - rq * rq) / (2 * d);
  double rs = sqrt(rp * rp - rc * rc);
  complex<double> diff = (cq - cp) / d;
  return {cp + complex<double>(rc, rs) * diff,
          cp + complex<double>(rc, -rs) * diff};
}
inline vector<complex<double> > convex_hull(vector<complex<double> >& p) {
  int n = p.size();
  vector<complex<double> > res(2 * n);
  int k = 0, t;
  sort((p).begin(), (p).end(), comp);
  for (int i = (0); i < (n); i++) {
    while (k > 1 && ccw(res[k - 2], res[k - 1], p[i]) < EPS) k--;
    res[k++] = p[i];
  }
  t = k;
  for (int j = (0); j < (n - 1); j++) {
    int i = n - 2 - j;
    while (k > t && ccw(res[k - 2], res[k - 1], p[i]) < EPS) k--;
    res[k++] = p[i];
  }
  res.resize(k - 1);
  return res;
}
inline bool convex_in(vector<complex<double> >& l, complex<double>& p) {
  int a = 0, b = l.size(), c;
  double A, C;
  complex<double> g = (l[a] + l[b - 1] + l[b / 2]) / 3.0;
  while (b - a > 1) {
    c = (a + b) / 2;
    A = cross(l[a] - g, p - l[a]);
    C = cross(l[c] - g, p - l[c]);
    if (cross(l[a] - g, l[c] - g) >= 0) {
      if (A > -EPS && C < -EPS)
        b = c;
      else
        a = c;
    } else {
      if (C < -EPS || A > -EPS)
        b = c;
      else
        a = c;
    }
  }
  return (cross(l[b % l.size()] - l[a], p - l[b % l.size()]) > -EPS);
}
inline double convex_area(vector<complex<double> >& l) {
  double res = 0;
  int n = l.size();
  for (int i = (2); i < (n); i++)
    res += (abs(cross(l[i - 1] - l[0], l[i] - l[i - 1]))) / 2.0;
  return res;
}
inline double area(vector<complex<double> >& l) {
  double res = 0;
  int n = l.size();
  for (int i = (0); i < (n); i++) res += cross(l[i], l[(i + 1) % n]);
  return abs(res) / 2.0;
}
inline vector<L> tangent_line(C c, complex<double> p) {
  vector<L> res;
  complex<double>(cp);
  double(r);
  tie(cp, r) = c;
  ;
  complex<double> v = p - cp;
  double dist = abs(v);
  if (dist - r > -EPS) {
    double _cos = r / dist;
    double _sin = sqrt(1.0 - _cos * _cos);
    v = v * (r / dist);
    {
      complex<double> e = complex<double>(_cos * v.real() - _sin * v.imag(),
                                          _sin * v.real() + _cos * v.imag());
      res.push_back({p, cp + e});
    }
    if (dist - r > EPS) {
      complex<double> e = complex<double>(_cos * v.real() + _sin * v.imag(),
                                          -_sin * v.real() + _cos * v.imag());
      res.push_back({p, cp + e});
    }
  }
  return res;
}
inline vector<L> inner_common_tangent_line(C p, C q) {
  vector<L> res;
  complex<double>(Mp);
  double(Rp);
  tie(Mp, Rp) = p;
  ;
  complex<double>(Mq);
  double(Rq);
  tie(Mq, Rq) = q;
  ;
  double dist = abs(Mp - Mq);
  if (dist - (Rp + Rq) > -EPS) {
    complex<double> mid = (Mq * Rp + Mp * Rq) / (Rp + Rq);
    res = tangent_line(p, mid);
  }
  return res;
}
inline vector<L> outer_common_tangent_line(C p, C q) {
  vector<L> res;
  complex<double>(Mp);
  double(Rp);
  tie(Mp, Rp) = p;
  ;
  complex<double>(Mq);
  double(Rq);
  tie(Mq, Rq) = q;
  ;
  complex<double> v = Mp - Mq;
  double dist = abs(v);
  if (dist - abs(Rp - Rq) > -EPS) {
    if (abs(Rp - Rq) < EPS) {
      complex<double> e = v * complex<double>(0, 1);
      e = e / dist;
      res.push_back(L(Mp + e, Mq + e));
      res.push_back(L(Mp - e, Mq - e));
    } else {
      complex<double> mid = Mp + (Mq - Mp) * Rp / (Rp - Rq);
      res = tangent_line(p, mid);
    }
  }
  return res;
}
vector<vector<complex<double> > > decomposition(vector<complex<double> > p) {
  int n = p.size();
  vector<vector<complex<double> > > res;
  while (n >= 3) {
    [&]() {
      for (int i = (0); i < (n); i++) {
        complex<double> a = p[i];
        complex<double> b = p[(i + 1) % n];
        complex<double> c = p[(i + 2) % n];
        if (ccw(a, b, c) < 0) continue;
        if ([&]() {
              for (int j = (3); j < (n); j++) {
                complex<double> d = p[(i + j) % n];
                if (ccw(a, b, d) > -EPS && ccw(b, c, d) > -EPS &&
                    ccw(c, a, d) > -EPS)
                  return true;
              }
              return false;
            }())
          continue;
        vector<complex<double> > nxt;
        for (int j = (0); j < (n); j++)
          if ((i + j) % n != (i + 1) % n) nxt.push_back(p[(i + j) % n]);
        swap(p, nxt);
        res.push_back({a, b, c});
        n--;
        return;
      }
    }();
  }
  return res;
}
int in_triangle(complex<double> p, vector<complex<double> > q) {
  for (int i = (0); i < (3); i++)
    if (abs(p - q[i]) < EPS) return 3;
  for (int i = (0); i < (3); i++) {
    int s = sgn(q[i], q[(i + 1) % 3], p);
    if (s != 1) {
      if (s == 0)
        return 2;
      else
        return 0;
    }
  }
  return 1;
}
}  // namespace geo
using namespace geo;
int main() {
  cout << fixed;
  cout << setprecision(1);
  int n;
  cin >> n;
  vector<complex<double> > p(n);
  for (int i = (0); i < (n); i++) {
    int x, y;
    cin >> x >> y;
    p[i] = complex<double>(x, y);
  }
  auto q = convex_hull(p);
  cout << (area(q) == area(p)) << endl;
  return 0;
}
