#include <bits/stdc++.h>
using namespace std;
int n, k[111111], b[111111];
void sort(int lo, int hi) {
  if (lo >= hi) return;
  int i = lo, j = hi;
  double t = (-1.0 * b[(lo + hi) / 2] / k[(lo + hi) / 2]);
  while (i <= j) {
    while (-1.0 * b[i] / k[i] < t) i++;
    while (-1.0 * b[j] / k[j] > t) j--;
    if (i <= j) {
      swap(k[i], k[j]);
      swap(b[i], b[j]);
      i++;
      j--;
    }
  }
  sort(i, hi);
  sort(lo, j);
}
int main() {
  scanf("%d", &n);
  int temp = 0;
  long long x = 0;
  for (int i = 1; i <= n; i++) {
    temp++;
    scanf("%d%d", &k[temp], &b[temp]);
    if (k[temp] == 0) {
      x += b[temp];
      temp--;
    }
  }
  n = temp;
  sort(1, n);
  int res = 0;
  for (int i = 1; i <= n;) {
    int j = i;
    while (j <= n && 1.0 * b[i] / k[i] == 1.0 * b[j] / k[j]) j++;
    res++;
    i = j;
  }
  printf("%d\n", res);
  return 0;
}
