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 long long mod = 1000000007;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
double eps = 1e-9;
struct point {
  double x, y;
  point() {}
  point(double x, double y) : x(x), y(y) {}
  void read() { scanf("%lf%lf", &x, &y); }
  void print() { printf("%.10f %.10f\n", x, y); }
  double len() { return sqrt(x * x + y * y); }
  double len2() { return x * x + y * y; }
};
point operator+(const point &a, const point &b) {
  return point(a.x + b.x, a.y + b.y);
}
point operator-(const point &a, const point &b) {
  return point(a.x - b.x, a.y - b.y);
}
point operator*(const point &a, const double &b) {
  return point(a.x * b, a.y * b);
}
point operator/(const point &a, const double &b) {
  return point(a.x / b, a.y / b);
}
double dot(const point &a, const point &b) { return a.x * b.x + a.y * b.y; }
double det(const point &a, const point &b) { return a.x * b.y - a.y * b.x; }
struct line {
  point a, b;
  line() {}
  line(point a, point b) : a(a), b(b) {}
};
point proj(const line &a, const point &b) {
  return a.a + (a.b - a.a) * dot(a.b - a.a, b - a.a) / (a.b - a.a).len2();
}
point reflect(const line &a, const point &b) { return proj(a, b) * 2 - b; }
int sign(double x) { return fabs(x) < eps ? 0 : (x > 0 ? 1 : -1); }
int relation(const line &a, const point &b) {
  int x = sign(det(a.b - a.a, b - a.a));
  if (x == 1)
    return 0;
  else if (x == -1)
    return 1;
  else {
    x = sign(dot(b - a.a, a.b - a.a));
    if (x == -1)
      return 2;
    else {
      x = sign(dot(b - a.b, a.b - a.a));
      if (x == 1)
        return 3;
      else
        return 4;
    }
  }
}
bool parallel(const line &a, const line &b) {
  return sign(det(a.a - a.b, b.a - b.b)) == 0;
}
bool ismiddle(const line &a, const point &b) {
  return sign(dot(b - a.a, a.b - a.a)) >= 0 &&
         sign(dot(b - a.b, a.b - a.a)) <= 0;
}
int crossSS(const line &a, const line &b) {
  if (sign(min(b.a.x, b.b.x) - max(a.a.x, a.b.x)) == 1) return 0;
  if (sign(max(b.a.x, b.b.x) - min(a.a.x, a.b.x)) == -1) return 0;
  if (sign(min(b.a.y, b.b.y) - max(a.a.y, a.b.y)) == 1) return 0;
  if (sign(max(b.a.y, b.b.y) - min(a.a.y, a.b.y)) == -1) return 0;
  int d1 = sign(det(a.b - a.a, b.a - a.a)) * sign(det(a.b - a.a, b.b - a.a));
  int d2 = sign(det(b.b - b.a, a.a - b.a)) * sign(det(b.b - b.a, a.b - b.a));
  if (d1 == -1 && d2 == -1)
    return 2;
  else if (d1 <= 0 && d2 <= 0)
    return 1;
  else
    return 0;
}
point crosspoint(const line &a, const line &b) {
  double a1 = det(b.b - b.a, a.a - b.a), a2 = det(b.b - b.a, a.b - b.a);
  return a.a * (a2 / (a2 - a1)) - a.b * (a1 / (a2 - a1));
}
double distSP(const line &a, const point &b) {
  point h = proj(a, b);
  if (ismiddle(a, h))
    return (b - h).len();
  else
    return min((b - a.a).len(), (b - a.b).len());
}
double distSS(const line &a, const line &b) {
  if (crossSS(a, b) >= 1)
    return 0;
  else
    return min(min(distSP(b, a.a), distSP(b, a.b)),
               min(distSP(a, b.a), distSP(a, b.b)));
}
double area(vector<point> &a) {
  double s = 0;
  int n = ((int)(a).size());
  for (int i = 0; i < n; i++) s += det(a[i], a[(i + 1) % n]);
  return 0.5 * s;
}
bool isconvex(vector<point> &a, int ty = 0) {
  int n = ((int)(a).size());
  for (int i = 0; i < n; i++) {
    int d = relation(line(a[i], a[(i + 1) % n]), a[(i + 2) % n]);
    if ((ty == 0 && (d != 0 && d != 3)) || (ty == 1 && d != 0)) return 0;
  }
  return 1;
}
int n;
vector<point> T;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    point p1;
    p1.read();
    T.push_back(p1);
  }
  printf("%d\n", isconvex(T));
}
