#include <bits/stdc++.h>
using namespace std;
map<long double, bool> p;
int n, ans;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    long double k, b;
    cin >> k >> b;
    if (k) p[-b / k] = 1;
  }
  printf("%d", p.size());
  return 0;
}
