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;
inline int in() {
  int x, y;
  y = scanf("%d", &x);
  return x;
}
const int N = -1;
const long double EPS = 1e-12;
const int LEFT = 0, RIGHT = 1, BACK = 2, FRONT = 3, ON = 4;
inline bool Geq(long double a, long double b) { return a + EPS > b; }
inline bool Grt(long double a, long double b) { return a > b + EPS; }
inline bool Leq(long double a, long double b) { return a < b + EPS; }
inline bool Lss(long double a, long double b) { return a + EPS < b; }
inline bool Equ(long double a, long double b) { return Geq(a, b) && Geq(b, a); }
istream& operator>>(istream& is, complex<long double>& p) {
  long double val;
  is >> val;
  p.real(val);
  is >> val;
  p.imag(val);
  return is;
}
long double dot(complex<long double> a, complex<long double> b) {
  return real(conj(a) * b);
}
long double cross(complex<long double> a, complex<long double> b) {
  return imag(conj(a) * b);
}
long double sqlen(complex<long double> a) { return dot(a, a); }
long double len(complex<long double> a) { return sqrt(sqlen(a)); }
complex<long double> proj(complex<long double> a, complex<long double> b,
                          complex<long double> c) {
  b -= a, c -= a;
  return a + b * real(c / b);
}
complex<long double> reflect(complex<long double> a, complex<long double> b,
                             complex<long double> c) {
  b -= a, c -= a;
  return a + conj(c / b) * b;
}
complex<long double> rotate(complex<long double> a, complex<long double> b,
                            long double theta) {
  return (b - a) * polar<long double>(1, theta) + a;
}
int relpos(complex<long double> a, complex<long double> b,
           complex<long double> c) {
  b -= a, c -= a;
  c /= b;
  if (Grt(c.imag(), 0)) return RIGHT;
  if (Lss(c.imag(), 0)) return LEFT;
  if (Lss(c.real(), 0)) return BACK;
  if (Grt(c.real(), 1)) return FRONT;
  return ON;
}
int side(complex<long double> a, complex<long double> b,
         complex<long double> c) {
  b -= a, c -= a;
  long double cr = (c / b).imag();
  return Grt(cr, 0) ? 1 : (Lss(cr, 0) ? -1 : 0);
}
bool intersect(complex<long double> a, complex<long double> b,
               complex<long double> c, complex<long double> d) {
  int as = side(c, d, a), bs = side(c, d, b), cs = side(a, b, c),
      ds = side(a, b, d);
  if (as && as == bs || cs && cs == ds)
    return false;
  else if (as || bs || cs || ds)
    return true;
  for (int j = 0; j < 2; j++, swap(a, c), swap(b, d)) {
    long double mx = min(a.real(), b.real()), Mx = max(a.real(), b.real()),
                my = min(a.imag(), b.imag()), My = max(a.imag(), b.imag());
    for (int k = 0; k < 2; k++, swap(c, d))
      if (Geq(c.real(), mx) && Leq(c.real(), Mx) && Geq(c.imag(), my) &&
          Leq(c.imag(), My))
        return true;
  }
  return false;
}
complex<long double> intersection(complex<long double> a,
                                  complex<long double> b,
                                  complex<long double> c,
                                  complex<long double> d) {
  long double c1 = cross(b - a, c - a), c2 = cross(b - a, d - a);
  return (c1 * d - c2 * c) / (c1 - c2);
}
long double distLSP(complex<long double> a, complex<long double> b,
                    complex<long double> c) {
  int rpos = relpos(a, b, proj(a, b, c));
  if (rpos == BACK) return len(c - a);
  if (rpos == FRONT) return len(c - b);
  b -= a, c -= a;
  return abs(imag(c / b)) * len(b);
}
long double distLS(complex<long double> a, complex<long double> b,
                   complex<long double> c, complex<long double> d) {
  if (intersect(a, b, c, d)) return 0;
  return min(min(distLSP(a, b, c), distLSP(a, b, d)),
             min(distLSP(c, d, a), distLSP(c, d, b)));
}
long double signedArea(vector<complex<long double> > p) {
  int n = p.size();
  long double res = 0;
  for (int i = 0; i < n; i++) res += cross(p[i], p[(i + 1) % n]);
  return res / 2;
}
long double area(vector<complex<long double> > poly) {
  return abs(signedArea(poly));
}
bool isConvex(vector<complex<long double> > p) {
  int n = p.size();
  bool neg = false, pos = false;
  for (int i = 0; i < n; i++) {
    int rpos = relpos(p[i], p[(i + 1) % n], p[(i + 2) % n]);
    if (rpos == LEFT) pos = true;
    if (rpos == RIGHT) neg = true;
  }
  return neg & pos == false;
}
int main() {
  vector<complex<long double> > poly;
  cout << setprecision(1) << fixed;
  for (int i = in(); i; i--) {
    complex<long double> p;
    cin >> p;
    poly.push_back(p);
  }
  cout << isConvex(poly) << endl;
  return 0;
}
