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;
void straight_line_passing_through_the_two_points(double x1, double y1,
                                                  double x2, double y2,
                                                  double *a, double *b,
                                                  double *c) {
  *a = (y2 - y1);
  *b = -(x2 - x1);
  *c = y2 * (x2 - x1) - x2 * (y2 - y1);
}
bool vertical_straight_line(double x, double y, double a1, double b1, double c1,
                            double *a2, double *b2, double *c2) {
  if (a1 * x + b1 * y + c1 == 0) return false;
  *a2 = -b1;
  *b2 = a1;
  *c2 = b1 * x - a1 * y;
  return true;
}
int intersection_and_parallel(double a1, double b1, double c1, double a2,
                              double b2, double c2, double *x, double *y) {
  if (a1 * b2 == a2 * b1) return false;
  *x = (b1 * c2 - b2 * c1) / (a1 * b2 - a2 * b1);
  *y = (a2 * c1 - a1 * c2) / (a1 * b2 - a2 * b1);
  return true;
}
int judges_whether_parallel_or_perpendicular(double a1, double b1, double c1,
                                             double a2, double b2, double c2) {
  if (a1 * b2 == a2 * b1) return 2;
  if (a1 * a2 + b1 * b2 == 0) return 1;
  return 0;
}
void line_symmetry(double a, double b, double c, double x1, double y1,
                   double *x2, double *y2) {
  double a2, b2, c2;
  vertical_straight_line(x1, y1, a, b, c, &a2, &b2, &c2);
  double c_x, c_y;
  intersection_and_parallel(a, b, c, a2, b2, c2, &c_x, &c_y);
  *x2 = x1 + 2 * (c_x - x1);
  *y2 = y1 + 2 * (c_y - y1);
}
double distance_between_the_two_pointss(double x1, double y1, double x2,
                                        double y2) {
  return sqrt(fabs((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)));
}
double angle_of_the_line(double x1, double y1, double x2, double y2) {
  return atan2(y2 - y1, x2 - x1);
}
int line_segment_cross_decision(double x1, double y1, double x2, double y2,
                                double x3, double y3, double x4, double y4) {
  double a1, b1, c1, a2, b2, c2;
  straight_line_passing_through_the_two_points(x1, y1, x2, y2, &a1, &b1, &c1);
  straight_line_passing_through_the_two_points(x3, y3, x4, y4, &a2, &b2, &c2);
  double c_x, c_y;
  bool is_parallel =
      intersection_and_parallel(a1, b1, c1, a2, b2, c2, &c_x, &c_y);
  if (is_parallel == false) {
    if (a1 == a2 && b1 == b2 && c1 == c2) {
      if (min(x1, x2) <= x3 && x3 <= max(x1, x2) && min(y1, y2) <= y3 &&
          y3 <= max(y1, y2))
        return 1;
      if (min(x1, x2) <= x4 && x4 <= max(x1, x2) && min(y1, y2) <= y4 &&
          y4 <= max(y1, y2))
        return 1;
      if (min(x3, x4) <= x1 && x1 <= max(x3, x4) && min(y3, y4) <= y1 &&
          y1 <= max(y3, y4))
        return 1;
      if (min(x3, x4) <= x2 && x2 <= max(x3, x4) && min(y3, y4) <= y2 &&
          y2 <= max(y3, y4))
        return 1;
    }
    return 0;
  }
  if (x1 > x2) swap(x1, x2);
  if (x3 > x4) swap(x3, x4);
  if (y1 > y2) swap(y1, y2);
  if (y3 > y4) swap(y3, y4);
  if (x1 <= c_x && c_x <= x2 && x3 <= c_x && c_x <= x4) {
    if (y1 <= c_y && c_y <= y2 && y3 <= c_y && c_y <= y4) return 1;
  }
  return 0;
}
double distance_between_the_line_segment_and_point(double p_x, double p_y,
                                                   double x1, double y1,
                                                   double x2, double y2) {
  double a, b, c;
  straight_line_passing_through_the_two_points(x1, y1, x2, y2, &a, &b, &c);
  double a2, b2, c2;
  double v_x, v_y;
  bool is_not_parallel =
      vertical_straight_line(p_x, p_y, a, b, c, &a2, &b2, &c2);
  intersection_and_parallel(a, b, c, a2, b2, c2, &v_x, &v_y);
  if (is_not_parallel) {
    if (min(x1, x2) <= v_x && v_x <= max(x1, x2) && min(y1, y2) <= v_y &&
        v_y <= max(y1, y2)) {
      return distance_between_the_two_pointss(p_x, p_y, v_x, v_y);
    } else {
      double l1 = distance_between_the_two_pointss(p_x, p_y, x1, y1);
      double l2 = distance_between_the_two_pointss(p_x, p_y, x2, y2);
      return min(l1, l2);
    }
  } else {
    if (min(x1, x2) <= p_x && p_x <= max(x1, x2) && min(y1, y2) <= p_y &&
        p_y <= max(y1, y2)) {
      return 0.0;
    } else {
      double l1 = distance_between_the_two_pointss(p_x, p_y, x1, y1);
      double l2 = distance_between_the_two_pointss(p_x, p_y, x2, y2);
      return min(l1, l2);
    }
  }
}
double distance_between_two_line_segment(double x1, double y1, double x2,
                                         double y2, double x3, double y3,
                                         double x4, double y4) {
  if (line_segment_cross_decision(x1, y1, x2, y2, x3, y3, x4, y4)) {
    return 0.0;
  }
  double l1, l2, l3, l4;
  l1 = distance_between_the_line_segment_and_point(x1, y1, x3, y3, x4, y4);
  l2 = distance_between_the_line_segment_and_point(x2, y2, x3, y3, x4, y4);
  l3 = distance_between_the_line_segment_and_point(x3, y3, x1, y1, x2, y2);
  l4 = distance_between_the_line_segment_and_point(x4, y4, x1, y1, x2, y2);
  return min(l1, min(l2, min(l3, l4)));
}
double area_of_the_polygon(int n, double p_xy[10000][2]) {
  double s = 0.0;
  for (int i = 0; i < n; i++) {
    s += (p_xy[i][0] - p_xy[(i + 1) % n][0]) *
         (p_xy[i][1] + p_xy[(i + 1) % n][1]) / 2;
  }
  return s;
}
double angle_of_the_two_edges(double ax, double ay, double bx, double by,
                              double cx, double cy) {
  double angle1 = angle_of_the_line(ax, ay, bx, by);
  double angle2 = angle_of_the_line(bx, by, cx, cy);
  double ret = angle1 + (M_PI - angle2);
  if (ret >= M_PI * 2) ret -= M_PI * 2;
  return ret;
}
int main(int argc, const char *argv[]) {
  int n;
  while (cin >> n) {
    double p_xy[10000][2] = {0};
    for (int i = 0; i < n; i++) {
      cin >> p_xy[i][0] >> p_xy[i][1];
    }
    bool flag = true;
    for (int i = 0; i < n; i++) {
      double angle = angle_of_the_two_edges(
          p_xy[i % n][0], p_xy[i % n][1], p_xy[(i + 1) % n][0],
          p_xy[(i + 1) % n][1], p_xy[(i + 2) % n][0], p_xy[(i + 2) % n][1]);
      if (angle > M_PI) {
        flag = false;
        break;
      }
    }
    cout << flag << endl;
  }
}
