#include <bits/stdc++.h>
using namespace std;
bool eq(long double a, long double b) { return (abs(a - b) <= 1e-150); }
int main() {
  int64_t n;
  cin >> n;
  vector<pair<int64_t, int64_t>> a;
  for (int64_t i = 0; i < n; ++i) {
    int64_t k, b;
    cin >> k >> b;
    if (k != 0) a.push_back({k, b});
  }
  n = a.size();
  if (n == 0) {
    cout << 0;
    return 0;
  }
  vector<long double> q(n);
  for (int64_t i = 0; i < n; ++i) {
    q[i] = a[i].second / (a[i].first + 0.0);
  }
  sort(q.begin(), q.end());
  int64_t cnt = 1;
  for (int64_t i = 0; i < n - 1; ++i) {
    if (!eq(q[i], q[i + 1])) ++cnt;
  }
  cout << cnt;
}
