#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1e-11;
int main() {
  vector<long double> v;
  int N, a, b;
  cin >> N;
  while (N--) {
    scanf("%d %d", &a, &b);
    long double theta = (long double)(b + 0.0) / (a + 0.0);
    if (a) v.push_back(theta);
  }
  sort(v.begin(), v.end());
  if (v.empty()) {
    puts("0");
    return 0;
  }
  int ans = 1;
  for (int j = 1; j < v.size(); j++)
    if (v[j] != v[j - 1]) ans++;
  cout << ans << endl;
}
