#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  set<long double> ans;
  for (int i = 0; i < n; ++i) {
    long double k, b;
    cin >> k >> b;
    if (k) {
      ans.insert(b / k);
    }
  }
  cout << ans.size() << "\n";
  return 0;
}
