#include <bits/stdc++.h>
using namespace std;
const int maxn = 100100;
long double a[maxn];
int main() {
  int n, s;
  long long k, b;
  while (~scanf("%d", &n)) {
    s = 0;
    for (int i = 0; i < n; i++) {
      scanf("%I64d %I64d", &k, &b);
      if (k != 0) {
        a[s++] = -(double)(b * 1.0) / (k * 1.0);
      }
    }
    sort(a, a + s);
    int count = 0;
    for (int i = 1; i < s; i++) {
      if (fabs(a[i] - a[i - 1]) > 0) {
        count++;
      }
    }
    if (s > 0) {
      count++;
    }
    printf("%d\n", count);
  }
  return 0;
}
