#include <bits/stdc++.h>
using namespace std;
double EPS = 1e-15;
double EQ(double a, double b) { return abs(a - b) < EPS; }
void fast_stream() { std::ios_base::sync_with_stdio(0); }
int ks[1000001];
int bs[1000001];
void solve() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> ks[i] >> bs[i];
  set<long double> vp;
  for (int i = 0; i < n; i++) {
    if (ks[i] == 0) continue;
    long double x = -1.0 * bs[i] / ks[i];
    vp.insert((x));
  }
  cout << vp.size() << endl;
}
int main() {
  solve();
  return 0;
}
