#include <bits/stdc++.h>
using namespace std;
map<long double, int> maps;
int main() {
  int n;
  long long k, b;
  long long cnt, ans;
  cnt = ans = 0;
  long double x;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lld%lld", &k, &b);
    if (k == 0) continue;
    x = (long double)(b * 1.0 / k);
    x = -x;
    if (maps.find(x) == maps.end()) ans++;
    maps.insert(pair<long double, int>(x, cnt));
    cnt++;
  }
  printf("%lld\n", ans);
}
