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<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>
#include<cmath>
#include<map>
#include<set>
#include<string>
#include<queue>
#include<stack>
using namespace std;
#define MON 1000000007
#define INF (1<<29)
#define EPS (1e-10)
typedef long long Int;
typedef pair<Int, Int> P;

#define max(x, y) ((x)>(y)?(x):(y))
#define min(x, y) ((x)<(y)?(x):(y))


class Vec{
public:
  double x, y;
  Vec(double x = 0, double y = 0):x(x),y(y){}

  Vec &read(){
    cin >> x >> y;
    return *this;
  }

  void print(){
    printf("%.10lf %.10lf\n", x, y);
  }
  
  Vec operator+(const Vec &other)
  {
    Vec result = *this;
    result.x += other.x;
    result.y += other.y;
    return result;
  }

  Vec operator-(const Vec &other)
  {
    Vec result = *this;
    result.x -= other.x;
    result.y -= other.y;
    return result;
  }

  Vec operator*(const double &k)
  {
    Vec result = *this;
    result.x *= k;
    result.y *= k;
    return result;
  }

  Vec operator/(const double &k)
  {
    Vec result = *this;
    result.x /= k;
    result.y /= k;
    return result;
  } 
  
  double cross(const Vec &other)
  {
    return x*other.y - y*other.x;
  }

  double dot(const Vec &other){
    return x*other.x + y*other.y;
  }
  
  bool operator==(const Vec &other) const
  {
    return abs(x - other.x) < EPS && abs(y - other.y) < EPS;
  }

  double norm()
  {
    return sqrt(x*x+y*y);
  }

  double norm2()
  {
    return x*x+y*y;
  }

  Vec standard(){
    Vec result = *this;
    return result/result.norm();
  }
};

//ccw:1, cw:-1, other:0
Int CCW(Vec a, Vec b, Vec c){
  b = b - a;
  c = c - a;
  if(b.cross(c) > EPS)return -1;
  if(b.cross(c) < -EPS)return 1;
  return 0;
}

double dist(Vec a, Vec b){
  return (a-b).norm();
}
			

class Line{
public:
  Vec a, b;
  Vec vect;
  Line(Vec a = Vec(), Vec b = Vec()):a(a),b(b),vect(b-a){}

  //projection
  Vec proj(Vec p){
    p = p - a;
    return a + vect * vect.dot(p) / vect.norm2();
  }

  //reflection
  Vec reflect(Vec p){
    return proj(p) * 2 - p;
  }

  bool onSegment(Vec p){
    return abs((p-a).cross(b-a)) < EPS && (p-a).dot(p-b) < EPS;
  }

  //other -> LineSegment(not inclusive), this -> Line
  bool _intersect(Line &other){
    return CCW(a, b, other.a) * CCW(a, b, other.b) < 0;
  }

  //other, this: both are LineSegment(inclusive)
  bool intersect(Line &other){
    return onSegment(other.a) || onSegment(other.b) || other.onSegment(a) || other.onSegment(b) || _intersect(other) && other._intersect(*this);
  }

  //low accuracy
  Vec crossPoint(Line &other){
    double ratio = (a - other.a).cross(vect) / other.vect.cross(vect);
    return other.a + other.vect * ratio;
  }

  double dist(Vec p){
    Vec pp = proj(p);
    if(onSegment(pp))return ::dist(p, pp);
    else return min(::dist(p, a), ::dist(p, b));
  }
  
  double dist(Line &other){
    if(intersect(other))return 0;
    return min(min(dist(other.a), dist(other.b)), min(other.dist(a), other.dist(b)));
  }
};

//Signed Area
double area(vector<Vec> &v){
  Int n = v.size();
  double area = 0;
  for(int i = 0;i < n;i++){
    area += v[i].cross(v[(i+1)%n]);
  }
  return area / 2;
}
void ok(){
  cout << "1" << endl;
  exit(0);
}

void ng(){
  cout <<  "0" << endl;
  exit(0);
}


int main(){
  Int n;
  cin >> n;
  vector<Vec> v;
  Vec p;
  for(int i = 0;i < n;i++){
    v.push_back(Vec().read());
  }
  Int ccw = 0;
  for(int i = 0;i < n;i++){
    Vec a = v[i];
    Vec b = v[(i+1)%n];
    Vec c = v[(i+2)%n];
    if(ccw == 0)ccw = CCW(a,b,c);
    else{
      if(CCW(a,b,c) == 0)continue;
      if(ccw != CCW(a,b,c))ng();
    }
  }
  ok();
  return 0;
}
