#include <bits/stdc++.h>
using namespace std;
set<long double> a;
int main() {
  int n, i, cnt = 0, tmp1, tmp2;
  long double now;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d %d", &tmp1, &tmp2);
    if (tmp1 != 0) a.insert((long double)tmp2 / tmp1);
  }
  cout << a.size();
}
