#include <bits/stdc++.h>
using namespace std;
int n;
long double a[100005];
int main() {
  cin >> n;
  int i, m = 0, ans;
  double b, k;
  for (i = 1; i <= n; i++) {
    cin >> 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++;
  cout << ans << endl;
  return 0;
}
