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 eps = 1e-10;
const double PI = acos(-1.0);
int dcmp(const double &x) {
  if (fabs(x) < eps) return 0;
  return x < 0 ? -1 : 1;
}
const int MOD = 1e9 + 7;
const int INF = 2e9;
const double INF_d = 1e64;
template <class T>
T qmod(T a, T b) {
  T ret = 1;
  while (b) {
    if (b & 1) ret *= a;
    b >>= 1;
    a *= a;
  }
  return ret;
}
template <class T>
T gcd(T a, T b) {
  return !b ? a : gcd(b, a % b);
}
template <class T>
T ex_gcd(T a, T b, T &x, T &y) {
  if (!b) {
    x = 1, y = 0;
    return a;
  }
  T t, ret;
  ret = ex_gcd(b, a % b, x, y);
  t = x, x = y, y = t - a / b * y;
  return ret;
}
template <class T>
T inv(T t, T p) {
  return t == 1 ? 1 : (p - p / t) * inv(p % t, p) % p;
}
struct point {
  double x, y;
  point() {}
  point(double a, double b) : x(a), y(b) {}
  point operator+(const point &p) { return point(x + p.x, y + p.y); }
  point operator-(const point &p) { return point(x - p.x, y - p.y); }
  point operator*(const double &k) { return point(x * k, y * k); }
  point operator/(const double &k) { return point(x / k, y / k); }
  double operator^(const point &p) { return x * p.y - y * p.x; }
  double operator*(const point &p) { return x * p.x + y * p.y; }
  bool operator==(const point &p) { return !dcmp(x - p.x) && !dcmp(y - p.y); }
  bool operator!=(const point &p) { return dcmp(x - p.x) || dcmp(y - p.y); }
  bool operator<(const point &p) { return x == p.x ? y < p.y : x < p.x; }
  void read() { scanf("%lf%lf", &x, &y); }
  void print() { printf("%.10f %.10f\n", x, y); }
  point rotate(double &ang) {
    return point(x * cos(ang) - y * sin(ang), y * cos(ang) + x * sin(ang));
  }
  point norm() { return point(-y, x); }
  double len() { return sqrt(x * x + y * y); }
  double len2() { return x * x + y * y; }
};
point err = point(INF_d, INF_d);
point proj_SP(point A, point B, point P) {
  point AB = B - A, AP = P - A;
  return A + AB * (AP * AB / AB.len2());
}
point refl_SP(point A, point B, point P) { return proj_SP(A, B, P) * 2 - P; }
struct line {
  point p[2], u;
  line() {}
  line(point s, point t) {
    p[0] = s, p[1] = t;
    u = p[1] - p[0];
  }
  point get_point(double t) { return point(p[0] + u * t); }
};
bool parallel(line L1, line L2) { return !dcmp(L1.u ^ L2.u); }
bool orthogonal(line L1, line L2) { return !dcmp(L1.u * L2.u); }
pair<bool, point> inter_LL(line L1, line L2) {
  if (parallel(L1, L2)) return make_pair(false, err);
  double t = ((L2.p[0] - L1.p[0]) ^ L2.u) / (L1.u ^ L2.u);
  return make_pair(true, L1.get_point(t));
}
bool one_dimention_check(double a, double b, double c, double d) {
  if (dcmp(a - b) > 0) swap(a, b);
  if (dcmp(c - d) > 0) swap(c, d);
  return dcmp(b - c) >= 0 && dcmp(a - d) <= 0;
}
bool check_SS(point A, point B, point C, point D) {
  bool flag = one_dimention_check(A.x, B.x, C.x, D.x) &&
              one_dimention_check(A.y, B.y, C.y, D.y);
  double a = dcmp((A - C) ^ (D - C)), b = dcmp((B - C) ^ (D - C)),
         c = dcmp((C - A) ^ (B - A)), d = dcmp((D - A) ^ (B - A));
  return flag && dcmp(a * b) <= 0 && dcmp(c * d) <= 0;
}
bool inmid(double a, double b, double c) {
  return dcmp(dcmp(b - c) * dcmp(a - c)) <= 0;
}
bool inmid(point A, point B, point P) {
  return inmid(A.x, B.x, P.x) && inmid(A.y, B.y, P.y);
}
double dis_SP(point A, point B, point P) {
  point p_proj = proj_SP(A, B, P);
  if (inmid(A, B, p_proj))
    return (P - p_proj).len();
  else
    return min((P - A).len(), (P - B).len());
}
double dis_SS(point A, point B, point C, point D) {
  double res = INF_d;
  if (check_SS(A, B, C, D)) res = 0;
  res = min(res, dis_SP(A, B, C));
  res = min(res, dis_SP(A, B, D));
  res = min(res, dis_SP(C, D, A));
  res = min(res, dis_SP(C, D, B));
  return res;
}
double poly_Area(point *poly, int n) {
  double res = 0.0;
  for (int i = 1; i < n - 1; i++) {
    res += (poly[i] - poly[0]) ^ (poly[i + 1] - poly[0]);
  }
  return fabs(res) / 2;
}
bool is_Convex(point *poly, int n) {
  poly[n] = poly[0];
  if (n < 3) return 1;
  for (int i = 1; i < n - 1; i++) {
    int tmp_dir = dcmp((poly[i] - poly[i - 1]) ^ (poly[(i + 1)] - poly[i]));
    if (tmp_dir < 0) return 0;
  }
  return 1;
}
const int N = 123;
int n;
point p[N];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    p[i].read();
  }
  printf("%d\n", is_Convex(p, n));
  return 0;
}
