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<sstream>
#include<algorithm>
#include<climits>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<ctime>
#include<cfloat>
#include<functional>
#include<map>
#include<string>
#include<cstring>
#include<vector>
#include<queue>
#include<stack>
#include<deque>
#include<set>
#include<bitset>
#include<list>
#include<numeric>
#include<complex>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> i_i;
typedef pair<long long, int> ll_i;
typedef pair<double, int> d_i;
typedef pair<long long, long long> ll_ll;
typedef pair<double, double> d_d;

#define PI 3.141592653589793238462643383279
#define mod 1000000007LL
#define rep(i, n) for(i = 0;i < n;++i)
#define rep1(i, n) for(i = 1;i < n;++i)
#define rep2d(i, j, n) for(i = 0;i < n;++i)for(j = i + 1;j < n;++j)
#define per(i, n) for(i = n - 1;i > -1;--i)
#define int(x) int x; scanf("%d",&x)
#define int2(x, y) int x, y; scanf("%d%d",&x, &y)
#define int3(x, y, z) int x, y, z; scanf("%d%d%d",&x, &y, &z)
#define scn(n, a) rep(i, n)cin >> a[i]
#define sc2n(n, a, b) rep(i, n)cin >> a[i] >> b[i]
#define pri(x) cout << x << "\n"
#define pri2(x, y) cout << x << " " << y << "\n"
#define pri3(x, y, z) cout << x << " " << y << " " << z << "\n"
#define pb push_back
#define mp make_pair
#define all(a) (a).begin(),(a).end()
#define endl "\n"
#define kabe puts("---------------------------")
#define kara puts("")
#define debug(x) cout << " --- " << x << "\n"
#define debug2(x, y) cout << " --- " << x << " " << y << "\n"
#define debug3(x, y, z) cout << " --- " << x << " " << y << " " << z << "\n"
#define X first
#define Y second
#define eps 0.00000000001
#define prid(x) printf("%.15lf\n", x)

struct vec{
  double x, y;
  vec operator+(const vec& a) const { return (vec){x + a.x, y + a.y}; }
  vec operator-(const vec& a) const { return (vec){x - a.x, y - a.y}; }
  vec sca(double t){ return (vec){t * x, t * y}; }
  double dot(vec a){ return x * a.x + y * a.y; }
  double cross(vec a){ return x * a.y - y * a.x; }
  double norm(){ return sqrt(x * x + y * y); }
  double norm2(){ return x * x + y * y; }
  double ppdist(vec p){ return sqrt( (p.x - x) * (p.x - x) + (p.y - y) * (p.y - y) ); }
  double ppdist2(vec p){ return (p.x - x) * (p.x - x) + (p.y - y) * (p.y - y); }
};
struct line{
  vec a, b;
  vec getvec(){ return b - a; }
  vec proj(vec p){
    vec pa = p - a, ba = b - a;
    double t = pa.dot(ba) / ba.dot(ba);
    return a + ba.sca(t);
  }
  vec vref(vec p){ return proj(p).sca(2.0) - p; }
  int ccw(vec p){
    vec q = p - a, ba = b - a;
    if(ba.cross(q) > 0)return 1; //ccw
    if(ba.cross(q) < 0)return -1; //cw
    if(ba.dot(q) < 0)return -2; //back
    if(ba.dot(ba) < q.dot(q))return 2; //front
    return 0; //on
  }
  bool paral(line l){
    double res = abs(l.getvec().cross(getvec()));
    return res < eps;
  }
  bool orth(line l){
    double res = abs(l.getvec().dot(getvec()));
    return res < eps;
  }
  bool intersec(line l){
    bool res0 = (ccw(l.a) * ccw(l.b) == 4); //syukutai
    bool res1 = (getvec().cross(l.a - a) * getvec().cross(l.b - a)) <= eps;
    bool res2 = (l.getvec().cross(a - l.a) * l.getvec().cross(b - l.a)) <= eps;
    return !res0 && res1 && res2;
  }
  vec crosspoint(line l){
    double t = (l.a - a).cross(l.getvec()) / getvec().cross(l.getvec());
    return a + getvec().sca(t);
  }
  double pldist(vec p){
    double res = min((a - p).norm2(), (b - p).norm2());
    vec h = proj(p);
    if((a - h).dot(b - h) < 0)res = min(res, (h - p).norm2());
    return sqrt(res);
  }
  double lldist(line l){
    if(intersec(l))return 0.0;
    return min(min(pldist(l.a), pldist(l.b)), min(l.pldist(a), l.pldist(b)));
  }
};
struct polygon{
  vector<vec> p;
  double area(){
    double res = 0.0;
    for(int i = 0;i < p.size();++i)res += p[i].cross(p[(i + 1) % p.size()]);
    return res / 2.0;
  }
  bool isconv(){
    for(int i = 0;i < p.size();++i)
    if((p[(i + 1) % p.size()] - p[i]).cross(p[(i + 2) % p.size()] - p[i]) < -eps)return false;
    return true;
  }
};

signed main(void){
  int i, j, k;
  polygon A;
  int(n);
  for(;n--;){
    double x, y; cin >> x >> y;
    A.p.pb((vec){x, y});
  }
  puts(A.isconv() ? "1" : "0");


  return 0;
}