#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const double eps = 1e-8;
const long long INF = 0x3f3f3f3f;
const long long maxn = 1e5 + 5;
const long long maxm = 1e6 + 5;
long long n;
long double k, b;
map<long double, bool> vis;
inline long long read();
signed main() {
  std::ios::sync_with_stdio(false);
  cin >> n;
  while (n--) {
    cin >> k >> b;
    if (k) vis[-b / k] = true;
  }
  cout << vis.size() << endl;
  return 0;
}
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    x = (x << 1) + (x << 3) + (ch ^ 48), ch = getchar();
  return x * f;
}
