#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  set<long double> se;
  double k, b;
  while (t--) {
    scanf("%lf%lf", &k, &b);
    if (k) {
      se.insert((long double)b / (long double)k);
    }
  }
  printf("%d", se.size());
  return 0;
}
