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;
typedef pair<complex<double>, complex<double> > L;
struct C {
  complex<double> p;
  double r;
};
double inf = 1e50, eps = 1e-10;
bool eq(double a, double b) { return abs(a - b) < eps; }
bool eq(complex<double> a, complex<double> b) { return abs(a - b) < eps; }
int sig(double a) { return eq(a, 0) ? 0 : (a > 0 ? 1 : -1); }
bool operator<(const complex<double>& l, const complex<double>& r) {
  return eq(l.real(), r.real()) ? l.imag() < r.imag() : l.real() < r.real();
}
bool compxy(const complex<double>& l, const complex<double>& r) {
  return eq(l.real(), r.real()) ? l.imag() < r.imag() : l.real() < r.real();
}
inline double dot(complex<double> a, complex<double> b) {
  return real(conj(a) * b);
};
inline double cro(complex<double> a, complex<double> b) {
  return imag(conj(a) * b);
};
enum ENCCW { CCW = 1, CW = -1, FRONT = -2, BACK = 2, ON = 0 };
inline int ccw(complex<double> a, complex<double> b, complex<double> c) {
  if (sig(cro(b - a, c - a)) == 1) return CCW;
  if (sig(cro(b - a, c - a)) == -1) return CW;
  if (eq(abs(a - c) + abs(c - b), abs(a - b))) return ON;
  if (eq(abs(a - b) + abs(b - c), abs(a - c))) return FRONT;
  if (eq(abs(c - a) + abs(a - b), abs(c - b))) return BACK;
  assert(false);
}
inline complex<double> proj(complex<double> a, complex<double> b) {
  return (dot(a, b) / norm(b)) * b;
}
inline complex<double> perp(L l, complex<double> p) {
  double t = dot(p - l.first, l.first - l.second) / norm(l.first - l.second);
  return l.first + t * (l.first - l.second);
}
inline complex<double> refl(L l, complex<double> p) {
  return p + 2.0 * (perp(l, p) - p);
}
inline bool ispal(L a, L b) {
  return sig(cro(a.first - a.second, b.first - b.second)) == 0;
}
inline bool ovLL(L a, L b) {
  return ispal(a, b) && sig(cro(a.first - a.second, b.first - a.second)) == 0;
}
inline bool iLL(L a, L b) { return !ispal(a, b) || ovLL(a, b); }
inline bool iLS(L l, L s) {
  return cro(l.second - l.first, s.first - l.first) *
             cro(l.second - l.first, s.second - l.first) <
         eps;
}
inline bool iLP(L l, complex<double> p) {
  return sig(cro(l.second - p, l.first - p));
}
inline bool iSS(L a, L b) {
  return ccw(a.first, a.second, b.first) * ccw(a.first, a.second, b.second) <=
             0 &&
         ccw(b.first, b.second, a.first) * ccw(b.first, b.second, a.second) <=
             0;
}
inline bool iSP(L s, complex<double> p) {
  return ccw(s.first, s.second, p) == ON;
}
inline double dLP(L l, complex<double> p) { return abs(perp(l, p) - p); }
inline double dLL(L a, L b) { return iLL(a, b) ? 0 : dLP(a, b.first); }
inline double dLS(L l, L s) {
  return iLS(l, s) ? 0 : min(dLP(l, s.first), dLP(l, s.second));
}
inline double dSP(L s, complex<double> p) {
  complex<double> q = perp(s, p);
  return iSP(s, q) ? abs(p - q) : min(abs(p - s.first), abs(p - s.second));
}
inline double dSS(L a, L b) {
  if (iSS(a, b)) return 0;
  return min(min(dSP(a, b.first), dSP(a, b.second)),
             min(dSP(b, a.first), dSP(b, a.second)));
}
inline complex<double> intLL(L a, L b) {
  assert(!ispal(a, b));
  double t = cro(a.second - a.first, a.second - b.first) /
             cro(a.second - a.first, b.second - b.first);
  return b.first + t * (b.second - b.first);
}
enum ENICP { INC = 1, ONC = 0, OUTC = -1 };
inline int iCP(C c, complex<double> p) {
  double d = abs(p - c.p);
  return eq(d, c.r) ? ONC : (d < c.r ? INC : OUTC);
}
inline int iCL(C c, L l) {
  double d = dLP(l, c.p);
  return eq(d, c.r) ? 1 : (d < c.r ? 2 : 0);
}
double aTri(complex<double> a, complex<double> b, complex<double> c) {
  return cro(b - a, c - a) / 2;
}
double aPol(vector<complex<double> > p) {
  int n = p.size();
  double ret = 0;
  for (int i = 0; i < n; i++) ret += cro(p[i], p[(i + 1) % n]) / 2;
  return ret;
}
complex<double> gPol(vector<complex<double> > p) {
  int n = p.size();
  complex<double> g;
  double s = aPol(p);
  assert(s > eps);
  for (int i = 0; i < n; i++) {
    double ds = cro(p[i], p[(i + 1) % n]) / 2;
    g += ds / 3 * (p[i] + p[(i + 1) % n]);
  }
  return g / s;
}
enum ENCONT { INP = 1, ONP = 0, OUTP = -1 };
int contain(vector<complex<double> > pol, complex<double> p) {
  bool in = false;
  for (int i = 0; i < pol.size(); i++) {
    complex<double> a = pol[i], b = pol[(i + 1) % pol.size()];
    if (ccw(a, b, p) == ON) return ONP;
    if (!iLS(L(p, p + 1.), L(a, b))) continue;
    if (ovLL(L(p, p + 1.), L(a, b))) {
      if (sig(max(real(a), real(b)) - real(p)) >= 0) in = !in;
      continue;
    }
    if (sig(real(intLL(L(p, p + 1.), L(a, b))) - real(p)) >= 0) in = !in;
  }
  return in ? INP : OUTP;
}
inline double heron(double a, double b, double c) {
  double s = (a + b + c) / 2;
  if (s - a < eps || s - b < eps || s - c < eps) return 0;
  return sqrt(s * (s - a) * (s - b) * (s - c));
}
inline vector<complex<double> > conv(vector<complex<double> > p) {
  int n = p.size(), k = 0;
  assert(n >= 3);
  sort(p.begin(), p.end(), compxy);
  vector<complex<double> > ret(2 * n);
  for (int i = 0; i < n; i++) {
    while (k >= 2 && ccw(ret[k - 2], ret[k - 1], p[i]) <= 0) --k;
    ret[k++] = p[i];
  }
  for (int i = n - 2, t = k + 1; i >= 0; i--) {
    while (k >= t && ccw(ret[k - 2], ret[k - 1], p[i]) <= 0) --k;
    ret[k++] = p[i];
  }
  ret.resize(k - 1);
  return ret;
}
inline vector<complex<double> > convall(vector<complex<double> > p) {
  int n = p.size(), k = 0;
  assert(n >= 3);
  sort(p.begin(), p.end(), compxy);
  vector<complex<double> > ret(2 * n);
  for (int i = 0; i < n; i++) {
    while (k >= 2 && ccw(ret[k - 2], ret[k - 1], p[i]) == -1) --k;
    ret[k++] = p[i];
  }
  for (int i = n - 2, t = k + 1; i >= 0; i--) {
    while (k >= t && ccw(ret[k - 2], ret[k - 1], p[i]) == -1) --k;
    ret[k++] = p[i];
  }
  ret.resize(k - 1);
  return ret;
}
int main() {
  int n;
  scanf("%d", &n);
  vector<complex<double> > pol;
  for (int i = 0; i < n; i++) {
    double x, y;
    scanf("%lf%lf", &x, &y);
    pol.push_back(complex<double>(x, y));
  }
  printf("%d\n", convall(pol).size() == n ? 1 : 0);
  return 0;
}
