#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (!b) {
    return a;
  }
  return gcd(b, a % b);
}
struct sy {
  int a, b;
  sy(int x = 0, int y = 0) : a(x), b(y) {}
  friend bool operator<(sy x, sy y) {
    if (x.a == y.a) return x.b < y.b;
    return x.a < y.a;
  }
};
int main() {
  int n;
  int a, b;
  while (cin >> n) {
    set<sy> k;
    while (n--) {
      cin >> a >> b;
      if (a) {
        int c = gcd(a, b);
        k.insert(sy(a / c, b / c));
      }
    }
    cout << k.size() << endl;
  }
}
