#include <bits/stdc++.h>
using namespace std;
inline int Readint() {
  int ret = 0;
  int f = 1;
  char ch;
  do {
    ch = getchar();
    if (ch == '-') f *= -1;
  } while (ch >= 0 && (ch < '0' || ch > '9'));
  while ('0' <= ch && ch <= '9') {
    ret = ret * 10 + ch - '0';
    ch = getchar();
  }
  return ret * f;
}
void open() {
  freopen("D.in", "r", stdin);
  freopen("D.out", "w", stdout);
}
void close() {
  fclose(stdin);
  fclose(stdout);
}
const int MAXN = 1E5 + 10;
set<long double> s;
int n;
void init() {
  n = Readint();
  int k, b;
  for (int i = 1, _END_ = n; i <= _END_; i++) {
    k = Readint(), b = Readint();
    if (k) s.insert((long double)b / (long double)k);
  }
  printf("%d\n", s.size());
}
int main() {
  int _ = 0;
  init();
  close();
  return 0;
}
