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;
double eps = 1e-9;
double dot_product(complex<double> a, complex<double> b) {
  return (conj(a) * b).real();
}
double cross_product(complex<double> a, complex<double> b) {
  return (conj(a) * b).imag();
}
double dist_lp(complex<double> a1, complex<double> a2, complex<double> p) {
  if (dot_product(a2 - a1, p - a1) < eps) return abs(p - a1);
  if (dot_product(a1 - a2, p - a2) < eps) return abs(p - a2);
  return abs(cross_product(a2 - a1, p - a1)) / abs(a2 - a1);
}
complex<double> projection(complex<double> p, complex<double> b) {
  return b * dot_product(p, b) / norm(b);
}
complex<double> projection2(complex<double> p1, complex<double> p2,
                            complex<double> p) {
  p -= p1;
  p2 -= p1;
  complex<double> proj = projection(p, p2);
  return p1 + proj;
}
bool is_online(complex<double> a1, complex<double> a2, complex<double> p) {
  return abs(a1 - p) + abs(a2 - p) <= abs(a1 - a2) + eps;
}
bool is_intersected(complex<double> a1, complex<double> a2, complex<double> b1,
                    complex<double> b2) {
  if (is_online(a1, a2, b1) || is_online(a1, a2, b2)) return true;
  if (is_online(b1, b2, a1) || is_online(b1, b2, a2)) return true;
  return (cross_product(a2 - a1, b1 - a1) * cross_product(a2 - a1, b2 - a1) <
          -eps) &&
         (cross_product(b2 - b1, a1 - b1) * cross_product(b2 - b1, a2 - b1)) <
             -eps;
}
double dist_ll(complex<double> a1, complex<double> a2, complex<double> b1,
               complex<double> b2) {
  if (is_intersected(a1, a2, b1, b2)) return 0;
  return min({dist_lp(a1, a2, b1), dist_lp(a1, a2, b2), dist_lp(b1, b2, a1),
              dist_lp(b1, b2, a1), abs(a1 - b1), abs(a1 - b2), abs(a2 - b1),
              abs(a2 - b2)});
}
double area_of_polygon(vector<complex<double> >& v) {
  int n = v.size();
  double res = 0;
  for (int i = 0; i + 2 < n; i++) {
    res += cross_product(v[i + 1] - v[0], v[i + 2] - v[0]);
  }
  return res / 2;
}
bool is_convex(vector<complex<double> >& v) {
  int n = v.size();
  for (int i = 0; i < n; i++) {
    complex<double> a = v[i % n], b = v[(i + 1) % n], c = v[(i + 2) % n];
    if (cross_product(b - a, c - a) < eps) return false;
  }
  return true;
}
int N;
vector<complex<double> > v;
int main() {
  cin >> N;
  double x, y;
  for (int i = 0; i < N; i++) {
    cin >> x >> y;
    v.push_back(complex<double>(x, y));
  }
  cout << (is_convex(v) ? 1 : 0) << endl;
}
