#include <bits/stdc++.h>
using namespace std;
set<long double> all;
int main() {
  int n;
  cin >> n;
  long double a[n], b[n];
  for (int i = 0; i < n; i++) cin >> a[i] >> b[i];
  for (int i = 0; i < n; i++)
    if (a[i] != 0) all.insert((-1 * b[i]) / a[i]);
  cout << (int)all.size() << endl;
  return 0;
}
