#include <bits/stdc++.h>
using namespace std;
double k[100001], b[100001];
int id[100001];
bool cmp(int i, int j) {
  if (k[i] == 0) return false;
  if (k[j] == 0) return true;
  if (b[i] / k[i] < b[j] / k[j]) return true;
  return false;
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    scanf("%lf%lf", &k[i], &b[i]);
    id[i] = i;
  }
  sort(id, id + n, cmp);
  int ans = 0;
  if (k[id[0]] != 0) ans++;
  for (int i = 1; i < n; i++) {
    if (k[id[i]] == 0) break;
    if (k[id[i]] * b[id[i - 1]] == k[id[i - 1]] * b[id[i]]) continue;
    ans++;
  }
  cout << ans << endl;
  return 0;
}
