#include <bits/stdc++.h>
using namespace std;
long double a[100001];
map<long double, int> ma;
int main() {
  for (int n; cin >> n;) {
    int i, j, num = 0;
    long double b, c, an = 0;
    for (i = 1; i <= n; ++i) {
      cin >> b >> c;
      if (b == 0) continue;
      num++;
      a[num] = -(c / b);
    }
    sort(a + 1, a + num + 1);
    for (i = 1; i < num; ++i) {
      if (a[i] != a[i + 1]) an++;
    }
    if (num > 0) an++;
    cout << an << endl;
  }
  return 0;
}
