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;
inline int toInt(string s) {
  int v;
  istringstream sin(s);
  sin >> v;
  return v;
}
inline long long toLongLong(string s) {
  long long v;
  istringstream sin(s);
  sin >> v;
  return v;
}
template <class T>
inline string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
inline vector<char> toVC(string s) {
  vector<char> data(s.begin(), s.end());
  return data;
}
template <typename List>
void SPRIT(const std::string &s, const std::string &delim, List &result) {
  result.clear();
  string::size_type pos = 0;
  while (pos != string::npos) {
    string::size_type p = s.find(delim, pos);
    if (p == string::npos) {
      result.push_back(s.substr(pos));
      break;
    } else {
      result.push_back(s.substr(pos, p - pos));
    }
    pos = p + delim.size();
  }
}
string TRIM(const string &str, const char *trimCharacterList = " \t\v\r\n") {
  string result;
  string::size_type left = str.find_first_not_of(trimCharacterList);
  if (left != string::npos) {
    string::size_type right = str.find_last_not_of(trimCharacterList);
    result = str.substr(left, right - left + 1);
  }
  return result;
}
template <typename T>
bool VECTOR_EXISTS(vector<T> vec, T data) {
  auto itr = std::find(vec.begin(), vec.end(), data);
  size_t index = distance(vec.begin(), itr);
  if (index != vec.size()) {
    return true;
  } else {
    return 0;
  }
}
double ceil_n(double dIn, int nLen) {
  double dOut;
  dOut = dIn * pow(10.0, nLen);
  dOut = (double)(int)(dOut + 0.9);
  return dOut * pow(10.0, -nLen);
}
double floor_n(double dIn, int nLen) {
  double dOut;
  dOut = dIn * pow(10.0, nLen);
  dOut = (double)(int)(dOut);
  return dOut * pow(10.0, -nLen);
}
double round_n(double dIn, int nLen) {
  double dOut;
  dOut = dIn * pow(10.0, nLen);
  dOut = (double)(int)(dOut + 0.5);
  return dOut * pow(10.0, -nLen);
}
int take_a_n(int num, int n) {
  string str = toString(num);
  return str[str.length() - n] - '0';
}
int strbase_2to10(const std::string &s) {
  int out = 0;
  for (int i = 0, size = s.size(); i < size; ++i) {
    out *= 2;
    out += ((int)s[i] == 49) ? 1 : 0;
  }
  return out;
}
int strbase_10to2(const std::string &s) {
  int binary = toInt(s);
  int out = 0;
  for (int i = 0; binary > 0; i++) {
    out = out + (binary % 2) * pow(static_cast<int>(10), i);
    binary = binary / 2;
  }
  return out;
}
int strbase_16to10(const std::string &s) {
  int out = stoi(s, 0, 16);
  return out;
}
int intbase_2to10(int in) {
  string str = toString(in);
  return strbase_2to10(str);
}
int intbase_10to2(int in) {
  string str = toString(in);
  return strbase_10to2(str);
}
int intbase_16to10(int in) {
  string str = toString(in);
  return strbase_16to10(str);
}
string intbase_10to16(unsigned int val, bool lower = true) {
  if (!val) return std::string("0");
  std::string str;
  const char hc = lower ? 'a' : 'A';
  while (val != 0) {
    int d = val & 15;
    if (d < 10)
      str.insert(str.begin(), d + '0');
    else
      str.insert(str.begin(), d - 10 + hc);
    val >>= 4;
  }
  return str;
}
long long bitcount64(long long bits) {
  bits = (bits & 0x5555555555555555) + (bits >> 1 & 0x5555555555555555);
  bits = (bits & 0x3333333333333333) + (bits >> 2 & 0x3333333333333333);
  bits = (bits & 0x0f0f0f0f0f0f0f0f) + (bits >> 4 & 0x0f0f0f0f0f0f0f0f);
  bits = (bits & 0x00ff00ff00ff00ff) + (bits >> 8 & 0x00ff00ff00ff00ff);
  bits = (bits & 0x0000ffff0000ffff) + (bits >> 16 & 0x0000ffff0000ffff);
  return (bits & 0x00000000ffffffff) + (bits >> 32 & 0x00000000ffffffff);
}
template <typename T>
std::istream &operator>>(std::istream &is, std::vector<T> &vec) {
  for (T &x : vec) is >> x;
  return is;
}
template <typename T>
std::ostream &operator<<(std::ostream &os, const std::vector<T> &vec) {
  for (const T &x : vec) os << x << " ";
  return os;
}
const double EPS = 1e-10;
const double PI = acos(-1.0);
const int MOD = 1000000007;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, 1, 0, -1};
template <typename T>
inline bool BETWEEN(const T aim, const T min, const T max) {
  if (min <= aim && aim <= max) {
    return true;
  } else {
    return false;
  }
}
template <class T>
inline T SQR(const T x) {
  return x * x;
}
template <class T1, class T2>
inline T1 POW(const T1 x, const T2 y) {
  if (!y)
    return 1;
  else if ((y & 1) == 0) {
    return SQR(POW(x, y >> 1));
  } else
    return POW(x, y ^ 1) * x;
}
template <typename T>
constexpr T ABS(T x) {
  return x < 0 ? -x : x;
}
template <class BidirectionalIterator>
bool next_partial_permutation(BidirectionalIterator first,
                              BidirectionalIterator middle,
                              BidirectionalIterator last) {
  reverse(middle, last);
  return next_permutation(first, last);
}
template <class BidirectionalIterator>
bool next_combination(BidirectionalIterator first1, BidirectionalIterator last1,
                      BidirectionalIterator first2,
                      BidirectionalIterator last2) {
  if ((first1 == last1) || (first2 == last2)) {
    return false;
  }
  BidirectionalIterator m1 = last1;
  BidirectionalIterator m2 = last2;
  --m2;
  while (--m1 != first1 && !(*m1 < *m2)) {
  }
  bool result = (m1 == first1) && !(*first1 < *m2);
  if (!result) {
    while (first2 != m2 && !(*m1 < *first2)) {
      ++first2;
    }
    first1 = m1;
    std::iter_swap(first1, first2);
    ++first1;
    ++first2;
  }
  if ((first1 != last1) && (first2 != last2)) {
    m1 = last1;
    m2 = first2;
    while ((m1 != first1) && (m2 != last2)) {
      std::iter_swap(--m1, m2);
      ++m2;
    }
    std::reverse(first1, m1);
    std::reverse(first1, last1);
    std::reverse(m2, last2);
    std::reverse(first2, last2);
  }
  return !result;
}
template <typename T>
constexpr bool ODD(T x) {
  return x % 2 != 0;
}
template <typename T>
constexpr bool EVEN(T x) {
  return x % 2 == 0;
}
template <class T>
inline T GCD(const T x, const T y) {
  if (x < 0) return GCD(-x, y);
  if (y < 0) return GCD(x, -y);
  return (!y) ? x : GCD(y, x % y);
}
template <class T>
inline T LCM(const T x, const T y) {
  if (x < 0) return LCM(-x, y);
  if (y < 0) return LCM(x, -y);
  return x * (y / GCD(x, y));
}
template <class T>
inline T EXTGCD(const T a, const T b, T &x, T &y) {
  if (a < 0) {
    T d = EXTGCD(-a, b, x, y);
    x = -x;
    return d;
  }
  if (b < 0) {
    T d = EXTGCD(a, -b, x, y);
    y = -y;
    return d;
  }
  if (!b) {
    x = 1;
    y = 0;
    return a;
  } else {
    T d = EXTGCD(b, a % b, x, y);
    T t = x;
    x = y;
    y = t - (a / b) * y;
    return d;
  }
}
template <class T>
inline bool ISPRIME(const T x) {
  if (x <= 1) return false;
  for (T i = 2; SQR(i) <= x; i++)
    if (x % i == 0) return false;
  return true;
}
template <class T>
vector<bool> ERATOSTHENES(const T n) {
  vector<bool> arr(n, true);
  for (int i = 2; SQR(i) < n; i++) {
    if (arr[i]) {
      for (int j = 0; i * (j + 2) < n; j++) {
        arr[i * (j + 2)] = false;
      }
    }
  }
  return arr;
}
template <typename T>
vector<bool> ERATOSTHENES(const T a, const T b) {
  vector<bool> small = ERATOSTHENES(b);
  vector<bool> prime(b - a, true);
  for (int i = 2; (T)(SQR(i)) < b; i++) {
    if (small[i]) {
      for (T j = max(2, (a + i - 1) / i) * i; j < b; j += i) {
        prime[j - a] = false;
      }
    }
  }
  return prime;
}
template <class T>
vector<T> DIVISOR(T n) {
  vector<T> v;
  for (int i = 1; i * i <= n; ++i) {
    if (n % i == 0) {
      v.push_back(i);
      if (i != n / i) {
        v.push_back(n / i);
      }
    }
  }
  sort(v.begin(), v.end());
  return v;
}
template <typename T>
T NCR(T n, T r) {
  T ans = 1;
  for (long long i = 0; i < long long(r); ++i) {
    ans = ans * (n - i) / (i + 1);
  }
  return ans;
}
int MATRIZ_CHAIN(vector<int> &p, vector<vector<int> > &s) {
  const static int INF = 1 << 20;
  const int n = p.size() - 1;
  vector<vector<int> > X(n, vector<int>(n, INF));
  s.resize(n, vector<int>(n));
  for (int i = 0; i < n; ++i) X[i][i] = 0;
  for (int w = 1; w < n; ++w)
    for (int i = 0, j; j = i + w, j < n; ++i)
      for (int k = i; k < j; ++k) {
        int f = p[i] * p[k + 1] * p[j + 1];
        if (X[i][k] + X[k + 1][j] + f < X[i][j]) {
          X[i][j] = X[i][k] + X[k + 1][j] + f;
          s[i][j] = k;
        }
      }
  return X[0][n - 1];
}
vector<int> LIS(const vector<int> &a) {
  const static int INF = 99999999;
  const int n = a.size();
  vector<int> A(n, INF);
  vector<int> id(n);
  for (int i = 0; i < n; ++i) {
    id[i] = distance(A.begin(), lower_bound(A.begin(), A.end(), a[i]));
    A[id[i]] = a[i];
  }
  int m = *max_element(id.begin(), id.end());
  vector<int> b(m + 1);
  for (int i = n - 1; i >= 0; --i)
    if (id[i] == m) b[m--] = a[i];
  return b;
}
template <typename T>
vector<T> LCS(const vector<T> &a, const vector<T> &b) {
  const int n = a.size(), m = b.size();
  vector<vector<int> > X(n + 1, vector<int>(m + 1));
  vector<vector<int> > Y(n + 1, vector<int>(m + 1));
  for (int i = (0); i < (n); ++i) {
    for (int j = (0); j < (m); ++j) {
      if (a[i] == b[j]) {
        X[i + 1][j + 1] = X[i][j] + 1;
        Y[i + 1][j + 1] = 0;
      } else if (X[i + 1][j] < X[i][j + 1]) {
        X[i + 1][j + 1] = X[i][j + 1];
        Y[i + 1][j + 1] = +1;
      } else {
        X[i + 1][j + 1] = X[i + 1][j];
        Y[i + 1][j + 1] = -1;
      }
    }
  }
  vector<T> c;
  for (int i = n, j = m; i > 0 && j > 0;) {
    if (Y[i][j] > 0)
      --i;
    else if (Y[i][j] < 0)
      --j;
    else {
      c.push_back(a[i - 1]);
      --i;
      --j;
    }
  }
  reverse((c).begin(), (c).end());
  return c;
}
vector<int> money_change(int C, vector<int> &cs) {
  const int INF = 99999999;
  int n = cs.size();
  vector<int> xs(C + 1, INF);
  vector<int> ys(C + 1);
  xs[0] = 0;
  for (int i = 0; i < n; ++i) {
    for (int c = 0; c + cs[i] <= C; ++c) {
      if (xs[c + cs[i]] > xs[c] + 1) {
        xs[c + cs[i]] = xs[c] + 1;
        ys[c + cs[i]] = c;
      }
    }
  }
  vector<int> zs;
  for (int c = C; c > 0; c = ys[c]) {
    zs.push_back(c - ys[c]);
  }
  return zs;
}
namespace std {
bool operator<(const complex<double> &a, const complex<double> &b) {
  return real(a) == real(b) ? imag(a) < imag(b) : real(a) < real(b);
}
}  // namespace std
double toRadian(double degree) { return degree * PI / 180.0; }
double toDegree(double radian) { return radian * 180.0 / PI; }
complex<double> unit_vector(complex<double> p) { return p / abs(p); }
pair<complex<double>, complex<double> > norm_vectors(complex<double> p) {
  return make_pair(p * complex<double>(0, 1), p * complex<double>(0, -1));
}
complex<double> rotate_vector(complex<double> v, double s) {
  return complex<double>(v.real() * cos(s) - v.imag() * sin(s),
                         v.real() * sin(s) + v.imag() * cos(s));
}
inline double dot(const complex<double> &a, const complex<double> &b) {
  return (a.real() * b.real() + a.imag() * b.imag());
}
inline double cross(const complex<double> &a, const complex<double> &b) {
  return (a.real() * b.imag() - a.imag() * b.real());
}
vector<complex<double> > convex_hull(vector<complex<double> > v) {
  int n = v.size(), k = 0;
  sort(v.begin(), v.end());
  vector<complex<double> > r(2 * n);
  for (int i = 0; i < n; i++) {
    while (k > 1 && cross(r[k - 1] - r[k - 2], v[i] - r[k - 1]) <= (1e-4)) k--;
    r[k++] = v[i];
  }
  for (int i = n - 2, t = k; i >= 0; i--) {
    while (k > t && cross(r[k - 1] - r[k - 2], v[i] - r[k - 1]) <= (1e-4)) k--;
    r[k++] = v[i];
  }
  r.resize(k - 1);
  return r;
}
double args_bac(complex<double> a, complex<double> b, complex<double> c) {
  return acos(dot(b - a, c - a) / (abs(b - a) * abs(c - a)));
}
double args_bac(double a, double b, double c) {
  return acos((b * b + c * c - a * a) / (2 * b * c));
}
double heron_area(double a, double b, double c) {
  double s = (a + b + c) / 2;
  return sqrt(s * (s - a) * (s - b) * (s - c));
}
double heron_area(complex<double> a, complex<double> b, complex<double> c) {
  b -= a;
  c -= a;
  return (cross(b, c) / 2.0);
}
complex<double> centerOfGravity(complex<double> a, complex<double> b,
                                complex<double> c) {
  return complex<double>((a.real() + b.real() + c.real()) / 3.0,
                         (a.imag() + b.imag() + c.imag()) / 3.0);
}
double circumScribedCircleRadius(complex<double> a, complex<double> b,
                                 complex<double> c) {
  double edgeA = abs(b - c);
  double angleA = args_bac(a, b, c);
  return (edgeA / sin(angleA) / 2.0);
}
complex<double> circumScribedCircleXY(complex<double> a, complex<double> b,
                                      complex<double> c) {
  double angleA = args_bac(a, b, c);
  double angleB = args_bac(b, a, c);
  double angleC = args_bac(c, a, b);
  double A = sin(2.0 * angleA);
  double B = sin(2.0 * angleB);
  double C = sin(2.0 * angleC);
  complex<double> point(
      (a.real() * A + b.real() * B + c.real() * C) / (A + B + C),
      (a.imag() * A + b.imag() * B + c.imag() * C) / (A + B + C));
  return point;
}
bool point_in_triangle(complex<double> a, complex<double> b, complex<double> c,
                       complex<double> p) {
  complex<double> ab = b - a;
  complex<double> bp = p - b;
  complex<double> bc = c - b;
  complex<double> cp = p - c;
  complex<double> ca = a - c;
  complex<double> ap = p - a;
  double c1 = cross(ab, bp);
  double c2 = cross(bc, cp);
  double c3 = cross(ca, ap);
  if ((c1 > 0 && c2 > 0 && c3 > 0) || (c1 < 0 && c2 < 0 && c3 < 0)) {
    return true;
  } else {
    return false;
  }
}
int points_relation(complex<double> a, complex<double> b, complex<double> c) {
  b -= a;
  c -= a;
  if (cross(b, c) > (1e-4)) return 1;
  if (cross(b, c) < -(1e-4)) return -1;
  if (dot(b, c) < -(1e-4)) return 2;
  if (abs(b) < abs(c)) return -2;
  return 0;
}
bool is_orthogonal(complex<double> a1, complex<double> a2, complex<double> b1,
                   complex<double> b2) {
  return (abs((dot(a1 - a2, b1 - b2)) - (0.0)) < (1e-4));
}
bool is_orthogonal(pair<complex<double>, complex<double> > line1,
                   pair<complex<double>, complex<double> > line2) {
  return (abs((dot(line1.first - line1.second, line2.first - line2.second)) -
              (0.0)) < (1e-4));
}
bool is_parallel(complex<double> a1, complex<double> a2, complex<double> b1,
                 complex<double> b2) {
  return (abs((cross(a1 - a2, b1 - b2)) - (0.0)) < (1e-4));
}
bool is_parallel(pair<complex<double>, complex<double> > line1,
                 pair<complex<double>, complex<double> > line2) {
  return (abs((cross(line1.first - line1.second, line2.first - line2.second)) -
              (0.0)) < (1e-4));
}
bool is_point_on_long_line(complex<double> a, complex<double> b,
                           complex<double> c) {
  return (abs((cross(b - a, c - a)) - (0.0)) < (1e-4));
}
bool is_point_on_line(complex<double> a, complex<double> b, complex<double> c) {
  return (abs(a - c) + abs(c - b) < abs(a - b) + (1e-4));
}
double distance_longline_point(complex<double> a, complex<double> b,
                               complex<double> c) {
  return abs(cross(b - a, c - a)) / abs(b - a);
}
double line_dis(pair<complex<double>, complex<double> > a, complex<double> x) {
  return abs(cross(a.second - a.first, x - a.first)) / abs(a.second - a.first);
}
double distance_line_point(complex<double> a, complex<double> b,
                           complex<double> c) {
  if (dot(b - a, c - a) < (1e-4)) return abs(c - a);
  if (dot(a - b, c - b) < (1e-4)) return abs(c - b);
  return abs(cross(b - a, c - a)) / abs(b - a);
}
bool is_intersected_lines(complex<double> a1, complex<double> a2,
                          complex<double> b1, complex<double> b2) {
  return (points_relation(a1, a2, b1) * points_relation(a1, a2, b2) <= 0 &&
          points_relation(b1, b2, a1) * points_relation(b1, b2, a2) <= 0);
}
double distance_line_line(complex<double> a1, complex<double> a2,
                          complex<double> b1, complex<double> b2) {
  if (is_intersected_lines(a1, a2, b1, b2)) {
    return 0;
  } else {
    return min(
        {distance_line_point(a1, a2, b1), distance_line_point(a1, a2, b2),
         distance_line_point(b1, b2, a1), distance_line_point(b1, b2, a2)});
  }
}
complex<double> intersection_lines_point(complex<double> a1, complex<double> a2,
                                         complex<double> b1,
                                         complex<double> b2) {
  complex<double> b = b2 - b1;
  double d1 = abs(cross(b, a1 - b1));
  double d2 = abs(cross(b, a2 - b1));
  double t = d1 / (d1 + d2);
  return a1 + (a2 - a1) * complex<double>(t, 0);
}
complex<double> intersection_longlines_point(complex<double> a1,
                                             complex<double> a2,
                                             complex<double> b1,
                                             complex<double> b2) {
  complex<double> a = a2 - a1;
  complex<double> b = b2 - b1;
  return a1 + a * complex<double>(cross(b, b1 - a1), 0) /
                  complex<double>(cross(b, a), 0);
}
complex<double> projection_point(complex<double> a, complex<double> b,
                                 complex<double> p) {
  double t = dot(p - a, a - b) / (abs(a - b) * abs(a - b));
  return a + (a - b) * t;
}
complex<double> reflection_point(complex<double> a, complex<double> b,
                                 complex<double> p) {
  return p + (projection_point(a, b, p) - p) * (double)2.0;
}
double poly_area(vector<complex<double> > p) {
  if (p.size() < 3) return 0;
  double res = cross(p[p.size() - 1], p[0]);
  for (int i = 1; i < p.size(); i++) {
    res += cross(p[i - 1], p[i]);
  }
  return abs(res) / 2;
}
bool is_convec_poly(vector<complex<double> > p) {
  for (int i = 0; i < p.size() - 1; i++) {
    for (int j = i + 1; j < p.size(); j++) {
      if (heron_area(p[i - 1], p[i], p[j]) < 0 ||
          heron_area(p[i], p[i + 1], p[j]) < 0) {
        return false;
      }
    }
  }
  return true;
}
double longest_points_distance(vector<complex<double> > p) {
  int n = p.size();
  if (n == 2) {
    return abs(p[0] - p[1]);
  }
  int i = 0, j = 0;
  for (int k = 0; k < n; k++) {
    if (!(p[i] < p[k])) i = k;
    if (p[j] < p[k]) j = k;
  }
  double res = 0;
  int si = i, sj = j;
  while (i != sj || j != si) {
    res = max(res, abs(p[i] - p[j]));
    if (cross(p[(i + 1) % n] - p[i], p[(j + 1) % n] - p[j]) < 0)
      i = (i + 1) % n;
    else
      j = (j + 1) % n;
  }
  return res;
}
double circle_area(pair<complex<double>, double> c) {
  return PI * c.second * c.second;
}
bool circle_in_x(pair<complex<double>, double> c, complex<double> x) {
  return (abs(x - c.first) + (1e-4) < c.second);
}
bool circle_on_x(pair<complex<double>, double> c, complex<double> x) {
  return (abs((abs(x - c.first)) - (c.second)) < (1e-4));
}
int circle_relation(pair<complex<double>, double> a,
                    pair<complex<double>, double> b) {
  double d = abs(a.first - b.first);
  if (a.second + b.second + (1e-4) < d) return -1;
  if (b.second + d + (1e-4) < a.second) return 1;
  if (a.second + d + (1e-4) < b.second) return 2;
  if (abs(a.second + b.second - d) < (1e-4)) return -3;
  if (abs(b.second + d - a.second) < (1e-4)) return 3;
  if (abs(a.second + d - b.second) < (1e-4)) return 4;
  return 0;
}
double intersection_area(pair<complex<double>, double> a,
                         pair<complex<double>, double> b) {
  double d = abs(a.first - b.first);
  if (a.second + b.second < d + (1e-4)) return 0;
  if (a.second < b.second) swap(a, b);
  if (b.second + d < a.second + (1e-4) || b.second < (1e-4))
    return circle_area(b);
  double t1 = args_bac(b.second, a.second, d);
  double t2 = args_bac(a.second, b.second, d);
  double tri =
      (a.second * a.second * sin(t1 * 2) + b.second * b.second * sin(t2 * 2)) /
      2.0;
  return a.second * a.second * t1 + b.second * b.second * t2 - tri;
}
vector<complex<double> > circle_inter_points(pair<complex<double>, double> a,
                                             pair<complex<double>, double> b) {
  vector<complex<double> > v;
  int pos = circle_relation(a, b);
  if (pos == 0) {
    double s = args_bac(b.second, abs(b.first - a.first), a.second);
    complex<double> x = a.second * unit_vector(b.first - a.first);
    v.push_back(a.first + rotate_vector(x, s));
    v.push_back(a.first + rotate_vector(x, -s));
  } else if (abs(pos) >= 3) {
    v.push_back(a.first + a.second * unit_vector(b.first - a.first));
  }
  return v;
}
vector<complex<double> > circle_inter_line_points(
    pair<complex<double>, double> a,
    pair<complex<double>, complex<double> > l) {
  vector<complex<double> > v;
  double d = line_dis(l, a.first);
  if (d < a.second + (1e-4)) {
    complex<double> x = a.second * unit_vector(l.second - l.first);
    if (points_relation(l.first, l.second, a.first) == 1)
      x = a.first + x * complex<double>(0, -1);
    else
      x = a.first + x * complex<double>(0, 1);
    if (d + (1e-4) < a.second) {
      double y = sqrt(a.second * a.second - d * d);
      if (d == 0) d += (1e-4);
      double s = args_bac(y, d, a.second);
      v.push_back(rotate_vector(x, s));
      v.push_back(rotate_vector(x, -s));
    } else if ((abs((d) - (a.second)) < (1e-4))) {
      v.push_back(x);
    }
  }
  return v;
}
vector<pair<complex<double>, complex<double> > > adjust_line(
    pair<complex<double>, double> c, complex<double> p) {
  vector<pair<complex<double>, complex<double> > > res;
  if (circle_in_x(c, p)) return res;
  if (circle_on_x(c, p)) {
    pair<complex<double>, complex<double> > n = norm_vectors(c.first - p);
    res.push_back(pair<complex<double>, complex<double> >(n.first + p, p));
    return res;
  }
  double x = c.second, z = abs(c.first - p);
  double y = sqrt(z * z - x * x);
  double s = args_bac(y, x, z);
  complex<double> v = unit_vector(p - c.first) * c.second;
  res.push_back(pair<complex<double>, complex<double> >(
      rotate_vector(v, s) + c.first, p));
  res.push_back(pair<complex<double>, complex<double> >(
      rotate_vector(v, -s) + c.first, p));
  return res;
}
vector<pair<complex<double>, complex<double> > > common_adjust_line(
    pair<complex<double>, double> a, pair<complex<double>, double> b) {
  vector<pair<complex<double>, complex<double> > > res;
  if (a.second + (1e-4) < b.second) return common_adjust_line(b, a);
  if ((abs((a.first.real()) - (b.first.real())) < (1e-4)) &&
      (abs((a.first.imag()) - (b.first.imag())) < (1e-4)) &&
      (abs((a.second) - (b.second)) < (1e-4)))
    return res;
  complex<double> pos =
      (b.first - a.first) * a.second / (a.second + b.second) + a.first;
  if (!circle_in_x(a, pos)) res = adjust_line(a, pos);
  if ((abs((a.second) - (b.second)) < (1e-4))) {
    pair<complex<double>, complex<double> > n =
        norm_vectors(unit_vector(b.first - a.first) * a.second);
    res.push_back(pair<complex<double>, complex<double> >(a.first + n.first,
                                                          b.first + n.first));
    res.push_back(pair<complex<double>, complex<double> >(a.first + n.second,
                                                          b.first + n.second));
  } else {
    double c = abs(b.first - a.first);
    pos = unit_vector(b.first - a.first) *
              ((a.second * c) / (a.second - b.second)) +
          a.first;
    if (!circle_in_x(a, pos)) {
      vector<pair<complex<double>, complex<double> > > tmp =
          adjust_line(a, pos);
      for (int i = 0; i < tmp.size(); i++) res.push_back(tmp[i]);
    }
  }
  return res;
}
int main() {
  int n;
  cin >> n;
  vector<complex<double> > points(n);
  for (int i = 0; i < n; i++) {
    double x, y;
    cin >> x >> y;
    points[i] = complex<double>(x, y);
  }
  auto ans = is_convec_poly(points);
  if (ans)
    cout << "1";
  else
    cout << "0";
  std::cout << "\n";
  ;
  return 0;
}
