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;
class range {
 private:
  struct Iter {
    int v;
    int operator*() { return v; }
    bool operator!=(Iter& itr) { return v < itr.v; }
    void operator++() { ++v; }
  };
  Iter i, n;

 public:
  range(int n) : i({0}), n({n}) {}
  range(int i, int n) : i({i}), n({n}) {}
  Iter& begin() { return i; }
  Iter& end() { return n; }
};
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& as) {
  for (int i = (int)(0); i < (int)(as.size()); ++i) {
    if (i != 0) os << " ";
    os << as[i];
  }
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const vector<vector<T> >& as) {
  for (int i = (int)(0); i < (int)(as.size()); ++i) {
    if (i != 0) os << endl;
    os << as[i];
  }
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const set<T>& ss) {
  for (__typeof((ss).begin()) a = (ss).begin(); a != (ss).end(); ++a) {
    if (a != ss.begin()) os << " ";
    os << a;
  }
  return os;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& os, const pair<T1, T2>& p) {
  os << p.first << " " << p.second;
  return os;
}
template <typename K, typename V>
ostream& operator<<(ostream& os, const map<K, V>& m) {
  bool isF = true;
  for (__typeof((m).begin()) p = (m).begin(); p != (m).end(); ++p) {
    if (!isF) os << endl;
    os << p;
    isF = false;
  }
  return os;
}
char tmp[1000];
template <class T>
T INF() {
  assert(false);
};
template <>
int INF<int>() {
  return 1 << 28;
};
template <>
int64_t INF<int64_t>() {
  return 1LL << 58;
};
template <>
double INF<double>() {
  return 1e16;
};
template <typename T>
T pmod(T v, T M) {
  return (v % M + M) % M;
}
namespace _double_tmpl {
const long double EPS = 1e-8;
static constexpr long double Ae = 0;
long double A(long double a, long double b) { return a + b; }
long double Ainv(long double a) { return -a; }
long double S(long double a, long double b) { return A(a, Ainv(b)); }
static constexpr long double Me = 1;
long double M(long double a, long double b) { return a * b; }
long double Minv(long double a) { return 1.0 / a; };
int sig(long double a, long double b = 0) {
  return a < b - EPS ? -1 : a > b + EPS ? 1 : 0;
}
bool eq(long double a, long double b) { return sig(abs(a - b)) == 0; }
}  // namespace _double_tmpl
using namespace _double_tmpl;
namespace Ps {
istream& operator>>(istream& is, complex<long double>& p) {
  long double x, y;
  is >> x >> y;
  p = P(x, y);
  return is;
}
bool eq(P a, P b) { return eq(a.real(), b.real()) and eq(a.imag(), b.imag()); }
long double cross(const complex<long double> P, &a,
                  const complex<long double> P, &b) {
  return imag(conj(a) * b);
}
long double dot(const complex<long double> P, &a, const complex<long double> P,
                &b) {
  return real(conj(a) * b);
}
int ccw(const P& a, P b, P c) {
  b -= a;
  c -= a;
  if (cross(b, c) > EPS) return +1;
  if (cross(b, c) < -EPS) return -1;
  if (dot(b, c) < 0) return +2;
  if (norm(b) < norm(c)) return -2;
  return 0;
}
}  // namespace Ps
using namespace Ps;
namespace Polys {
bool is_convex(const Poly& ps) {
  int n = ps.size();
  for (int i = (int)(0); i < (int)(n); ++i)
    if (ccw(ps[pmod(i, n)], ps[pmod(i + 1, n)], ps[pmod(i + 2, n)]) !=
        ccw(ps[pmod(i + 1, n)], ps[pmod(i + 2, n)], ps[pmod(i + 3, n)]))
      return false;
  return true;
}
}  // namespace Polys
using namespace Polys;
stringstream ss;
class Main {
 public:
  void run() {
    int n;
    cin >> n;
    Poly poly;
    for (int i = (int)(0); i < (int)(n); ++i) {
      P p;
      cin >> p;
      poly.push_back(p);
    }
    cout << is_convex(poly) << endl;
  }
};
int main() {
  cout << fixed << setprecision(20);
  cin.tie(0);
  ios::sync_with_stdio(false);
  Main().run();
  return 0;
}
