#include <bits/stdc++.h>
constexpr long long BASE = 1000000007;
using namespace std;
template <typename T>
T calc_gcd(T a, T b) {
  if (a < 0) a = -a;
  if (b < 0) b = -b;
  if (b > a) {
    swap(a, b);
  }
  if (b == 0) return a;
  while (a % b) {
    a = a % b;
    swap(a, b);
  }
  return b;
}
int modpow(int a, int b, int base) {
  vector<int> vb, va;
  while (b != 0) {
    vb.push_back(b % 2);
    b /= 2;
    va.push_back(a);
    a *= a;
    a %= base;
  }
  int ans = 1;
  for (int i = 0; i < vb.size(); i++) {
    if (vb[i] == 1) {
      ans *= va[i];
      ans %= base;
    }
  }
  return ans;
}
inline bool operator<=(pair<long long, long long> a,
                       pair<long long, long long> b) {
  if (a.first > b.first) return false;
  if (a.first < b.first) return true;
  return a.second <= b.second;
}
inline bool operator<(pair<long long, long long> a,
                      pair<long long, long long> b) {
  if (a.first > b.first) return false;
  if (a.first < b.first) return true;
  return a.second < b.second;
}
inline bool operator>(pair<long long, long long> a,
                      pair<long long, long long> b) {
  if (a.first < b.first) return false;
  if (a.first > b.first) return true;
  return a.second > b.second;
}
inline bool operator>=(pair<long long, long long> a,
                       pair<long long, long long> b) {
  if (a.first < b.first) return false;
  if (a.first > b.first) return true;
  return a.second >= b.second;
}
inline bool operator==(pair<long long, long long> a,
                       pair<long long, long long> b) {
  return (a.first == b.first && a.second == b.second);
}
inline bool operator!=(pair<long long, long long> a,
                       pair<long long, long long> b) {
  return !(a.first == b.first && a.second == b.second);
}
int bs(int l, int r, pair<long long, long long>);
vector<pair<long long, long long>> v;
int main() {
  int n;
  long long a, b;
  cin >> n;
  long long num_0 = 0;
  int index = 0;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    if (a == 0 && b == 0) {
      num_0++;
    } else {
      if (b < 0) {
        a = -a;
        b = -b;
      } else if (b == 0 && a < 0) {
        a = -a;
      }
      v.push_back(make_pair(a, b));
    }
  }
  sort(v.begin(), v.end());
  vector<pair<pair<long long, long long>, int>> v2;
  v2.push_back(make_pair(v[0], 1));
  pair<long long, long long> now = v[0];
  for (int i = 1; i < v.size(); i++) {
    if (1) {
      v2[v2.size() - 1].second++;
    } else {
      v2.push_back(make_pair(v[i], 1));
      now = v[i];
    }
  }
}
int bs(int l, int r, pair<long long, long long> a) {
  if (v[l] > a) return -1;
  if (v[r] < a) return -1;
  if (v[r] == a) return r;
  if (r - l <= 1) {
    if (v[l] == a)
      return l;
    else
      return -1;
  } else {
    int mid = (l + r) / 2;
    if (v[mid] > a) {
      return bs(l, mid, a);
    } else {
      return bs(mid, r, a);
    }
  }
}
