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;
const double PI = acos(-1.0);
inline int signum(double x) { return (abs(x) < 1e-8) ? 0 : (x > 0) ? 1 : -1; }
double dot(complex<double> a, complex<double> b) {
  return a.real() * b.real() + a.imag() * b.imag();
}
double cross(complex<double> a, complex<double> b) {
  return a.real() * b.imag() - a.imag() * b.real();
}
double toRadian(double degree) { return degree * PI / 180.0; }
double toDegree(double radian) { return radian * 180.0 / PI; }
int ccw(complex<double> a, complex<double> b, complex<double> c) {
  b -= a;
  c -= a;
  int sign = signum(cross(b, c));
  if (sign != 0) return sign;
  if (signum(dot(b, c)) == -1) return 2;
  if (abs(b) < abs(c)) return -2;
  return 0;
}
double dis_p_li(complex<double> a, complex<double> b, complex<double> c) {
  b -= a;
  c -= a;
  return abs(cross(b, c)) / abs(b);
}
double dis_p_li_ss(complex<double> a, complex<double> b, complex<double> c) {
  complex<double> x1 = b - a;
  complex<double> y1 = c - a;
  complex<double> x2 = a - b;
  complex<double> y2 = c - b;
  if (signum(dot(x1, y1)) < 0) return abs(y1);
  if (signum(dot(x2, y2)) < 0) return abs(y2);
  return dis_p_li(a, b, c);
}
bool is_intersected_li_ss(complex<double> a1, complex<double> a2,
                          complex<double> b1, complex<double> b2) {
  return (ccw(a1, a2, b1) * ccw(a1, a2, b2) <= 0) &&
         (ccw(b1, b2, a1) * ccw(b1, b2, a2) <= 0);
}
double dis_li_s_li_s(complex<double> a1, complex<double> a2, complex<double> b1,
                     complex<double> b2) {
  if (is_intersected_li_ss(a1, a2, b1, b2)) return 0.0;
  return min({dis_p_li_ss(a1, a2, b1), dis_p_li_ss(a1, a2, b2),
              dis_p_li_ss(b1, b2, a1), dis_p_li_ss(b1, b2, a2)});
}
double area_tri(double a, double b, double c) {
  double s = (a + b + c) / 2;
  return sqrt(s * (s - a) * (s - b) * (s - c));
}
double area_tri(complex<double> a, complex<double> b, complex<double> c) {
  double x = abs(b - a);
  double y = abs(c - b);
  double z = abs(a - c);
  return area_tri(x, y, z);
}
double area_poly(vector<complex<double> > poly) {
  double ans = 0.0;
  for (int i = 0; i < poly.size(); i++)
    ans += cross(poly[i], poly[(i + 1) % poly.size()]);
  return abs(ans) / 2.0;
}
bool is_convex_poly(vector<complex<double> > poly) {
  int n = poly.size();
  int sign = signum(cross(poly[1] - poly[0], poly[2] - poly[1]));
  bool good = true;
  for (int i = 0; i < poly.size(); i++) {
    int s = signum(cross(poly[(i + 1) % n] - poly[i % n],
                         poly[(i + 2) % n] - poly[(i + 1) % n]));
    if (s != 0 && sign != s) good = false;
  }
  return good;
}
int main() {
  int N;
  cin >> N;
  vector<complex<double> > poly(N);
  for (int i = 0; i < N; i++) {
    double x, y;
    cin >> x >> y;
    poly[i] = complex<double>(x, y);
  }
  bool result = is_convex_poly(poly);
  if (result)
    cout << 1;
  else
    cout << 0;
}
