#include <bits/stdc++.h>
using namespace std;
int n;
long double a[100005];
int main() {
  int i, m = 0, ans;
  double b, k;
  while (~scanf("%d", &n)) {
    m = 0;
    for (i = 1; i <= n; i++) {
      scanf("%lf %lf", &k, &b);
      if (k != 0) a[++m] = -(b / k);
    }
    sort(a + 1, a + 1 + m);
    ans = 0;
    for (i = 2; i <= m; i++) {
      if (fabs(a[i] - a[i - 1] > 1e-20)) ans++;
    }
    if (m) ans++;
    printf("%d\n", ans);
  }
  return 0;
}
