#include <bits/stdc++.h>
using namespace std;
map<long double, int> p;
int main() {
  int i, j, n;
  int k, b;
  scanf("%d", &n);
  while (n--) {
    scanf("%d%d", &k, &b);
    if (k) {
      p[(long double)-b / k] = 1;
    }
  }
  printf("%d\n", p.size());
  return 0;
}
