#include <bits/stdc++.h>   using namespace std;   int n;   struct Line {     int k, b;   } a[100100];   struct Fraction {     int x, y;   } b[100100];   int gcd(int x, int y) {     if (x == 0)       return y;     else       return gcd(y % x, x);   }   bool cmp(const Fraction &t1, const Fraction &t2) {     if (t1.x != t2.x) return (t1.x < t2.x);     return (t1.y < t2.y);   }   int main() {     scanf( %d , &n);     int tot = 0;     for (int i = 1; i <= n; ++i) {       scanf( %d%d , &a[i].k, &a[i].b);       if (a[i].k != 0) {         b[++tot].x = -a[i].b;         b[tot].y = a[i].k;         if (b[tot].x < 0) {           b[tot].x *= -1;           b[tot].y *= -1;         }         int g = gcd(abs(b[tot].x), abs(b[tot].y));         b[tot].x /= g;         b[tot].y /= g;         if (b[tot].x == 0) b[tot].y = 1;       }     }     sort(b + 1, b + tot + 1, cmp);     int ans = 0;     for (int i = 1; i <= tot; ++i) {       if (i == 1 || b[i].x != b[i - 1].x || b[i].y != b[i - 1].y) ans++;     }     printf( %d n , ans);     return 0;   }   