#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int maxn = 1009;
const long double esp = 1e-6;
int main() {
  map<long double, int> m;
  int n, k, b;
  scanf("%d", &n);
  while (n--) {
    cin >> k >> b;
    if (k) m[1.0 * b / k] = 1;
  }
  printf("%d\n", m.size());
  return 0;
}
