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
/* Header {{{ */
#include <bits/stdc++.h>
using namespace std;

typedef long long readtype;
typedef long long var;
typedef long double let;

readtype read() {
  readtype a = 0, c = getchar(), s = 0;
  while (!isdigit(c)) s |= c == '-', c = getchar();
  while (isdigit(c)) a = a * 10 + c - 48, c = getchar();
  return s ? -a : a;
}

#ifdef LOCAL_LOGGER
#define logger(...) fprintf(stderr, __VA_ARGS__)
#define abortif(v, ...) if (v) {logger("Error in Line %d, Function '%s()'.\nInfo: ", __LINE__, __FUNCTION__); logger(__VA_ARGS__); exit(0);}
#else
#define logger(...);
#define abortif(v, ...);
#endif
/* }}} */

const int N = 101;

struct Point {
  let x, y;
  friend let Times(Point a, Point b) {
    return a.x * b.y - a.y * b.x;
  }
  friend Point operator - (Point a, Point b) {
    return (Point) {a.x - b.x, a.y - b.y};
  }
};

bool CheckConvex(int n, Point *point) {
  if (Times(point[2] - point[1], point[3] - point[2]) < 0) 
    reverse(point + 1, point + n + 1);
  for (int i = 1; i < n - 1; ++i) {
    if (Times(point[i + 1] - point[i], point[i + 2] - point[i + 1]) < 0) 
      return false;
  }
  if (Times(point[n] - point[n - 1], point[1] - point[n]) < 0) return false;
  return true;
}

Point ReadPoint() {
  Point p;
  scanf("%Lf%Lf", &p.x, &p.y);
  return p;
}

Point point[N];

int main() {
// #ifndef ONLINE_JUDGE
//   freopen("CGL_3_B.in", "r", stdin);
//   freopen("CGL_3_B.out", "w", stdout);
// #endif
// #ifdef LOCAL_LOGGER
//   freopen("CGL_3_B.log", "w", stderr);
// #endif
  int n = read();
  for (int i = 1; i <= n; ++i) point[i] = ReadPoint();
  puts(CheckConvex(n, point) ? "1" : "0");
  return 0;
}

/* ==== Makefile ==== {{{
CompileAndRun:
	make Compile
	make Run

Compile:
	g++ -o CGL_3_B CGL_3_B.cpp -g -Wall -DLOCAL_LOGGER

CompileUF:
	g++ -o CGL_3_B CGL_3_B.cpp -g -Wall -DLOCAL_LOGGER -fsanitize=undefined

Run:
	./CGL_3_B < CGL_3_B.in > CGL_3_B.out
==================
}}} */

