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 struct {
  complex<long double> s, t;
} L;
typedef struct {
  complex<long double> c;
  long double r;
} C;
const long double eps = 1.0e-10;
const long double pi = acos(-1.0);
template <class T>
bool operator==(T a, T b) {
  return abs(a - b) < eps;
}
template <class T>
bool operator<(T a, T b) {
  return a < b - eps;
}
template <class T>
bool operator<=(T a, T b) {
  return a < b + eps;
}
template <class T>
int sig(T r) {
  return (r == 0 || r == -0) ? 0 : r > 0 ? 1 : -1;
}
long double ip(complex<long double> a, complex<long double> b) {
  return a.real() * b.real() + a.imag() * b.imag();
}
long double ep(complex<long double> a, complex<long double> b) {
  return a.real() * b.imag() - a.imag() * b.real();
}
long double sq(long double a) { return sqrt(max(a, (long double)0)); }
complex<long double> vec(L l) { return l.t - l.s; }
inline complex<long double> input() {
  long double x, y;
  cin >> x >> y;
  return complex<long double>(x, y);
}
enum CCW {
  LEFT = 1,
  RIGHT = 2,
  BACK = 4,
  FRONT = 8,
  MID = 16,
  ON = FRONT | BACK | MID
};
inline int ccw(complex<long double> base, complex<long double> a,
               complex<long double> b) {
  a -= base;
  b -= base;
  if (ep(a, b) > 0) return LEFT;
  if (ep(a, b) < 0) return RIGHT;
  if (ip(a, b) < 0) return BACK;
  if (norm(a) < norm(b)) return FRONT;
  return MID;
}
inline bool cmp_x(const complex<long double> &a,
                  const complex<long double> &b) {
  return (abs(a.real() - b.real()) < eps) ? a.imag() < b.imag()
                                          : a.real() < b.real();
}
inline bool cmp_y(const complex<long double> &a,
                  const complex<long double> &b) {
  return (abs(a.imag() - b.imag()) < eps) ? a.real() < b.real()
                                          : a.imag() < b.imag();
}
inline bool cmp_a(const complex<long double> &a,
                  const complex<long double> &b) {
  return (abs(arg(a) - arg(b)) < eps) ? norm(a) < norm(b) : arg(a) < arg(b);
}
long double area(vector<complex<long double> > pol) {
  int n = pol.size();
  long double sum = 0.0;
  for (int(i) = 0; (i) < (n); (i)++) {
    long double x = pol[i % n].real() - pol[(i + 1) % n].real();
    long double y = pol[i % n].imag() + pol[(i + 1) % n].imag();
    sum += x * y;
  }
  return abs(sum / 2.0);
}
vector<complex<long double> > convex_hull(vector<complex<long double> > pol) {
  int n = pol.size(), k = 0;
  sort(pol.begin(), pol.end(), cmp_x);
  vector<complex<long double> > res(2 * n);
  for (int(i) = 0; (i) < (n); (i)++) {
    while (k > 1 && ep(res[k - 1] - res[k - 2], pol[i] - res[k - 1]) <= 0) k--;
    res[k++] = pol[i];
  }
  for (int i = n - 2, t = k; i >= 0; i--) {
    while (k > t && ep(res[k - 1] - res[k - 2], pol[i] - res[k - 1]) <= 0) k--;
    res[k++] = pol[i];
  }
  res.resize(k - 1);
  return res;
}
int in_polygon(vector<complex<long double> > pol, complex<long double> p) {
  int n = pol.size();
  int res = 0;
  for (int(i) = 0; (i) < (n); (i)++) {
    if (ccw(pol[i], pol[(i + 1) % n], p) == MID) return 1;
    long double vt =
        (p.imag() - pol[i].imag()) / (pol[(i + 1) % n].imag() - pol[i].imag());
    long double dx = pol[(i + 1) % n].real() - pol[i].real();
    if ((pol[i].imag() <= p.imag()) && (p.imag() < pol[(i + 1) % n].imag()) &&
        (p.real() < pol[i].real() + vt * dx))
      res++;
    if ((pol[i].imag() > p.imag()) && (p.imag() >= pol[(i + 1) % n].imag()) &&
        (p.real() < pol[i].real() + vt * dx))
      res--;
  }
  return res ? 2 : 0;
}
int main(void) {
  int n;
  cin >> n;
  vector<complex<long double> > pol;
  for (int(i) = 0; (i) < (n); (i)++) pol.push_back(input());
  vector<complex<long double> > res = convex_hull(pol);
  cout << (pol.size() == res.size()) << endl;
  return 0;
}
