#define _USE_MATH_DEFINES #include using namespace std; //template #define rep(i,a,b) for(int i=(a);i<(b);i++) #define rrep(i,a,b) for(int i=(a);i>(b);i--) #define ALL(v) (v).begin(),(v).end() typedef long long int ll; const int inf = 0x3fffffff; const ll INF = 0x3fffffffffffffff; template inline bool chmax(T& a,T b){ if(a inline bool chmin(T& a,T b){ if(a>b){a=b;return 1;}return 0; } //template end long double eps=1e-15; int main(){ int n; scanf("%d",&n); vector a; rep(i,0,n){ int x,y; scanf("%d%d",&x,&y); if(x==0&&y==0)continue; long double theta=atan2l(x,y); if(theta<0)theta+=2*M_PI; a.push_back(theta); } sort(ALL(a)); n=a.size(); ll ans=0; int idx=0; rep(i,0,n){ if(a[i]>=M_PI)break; long double lim=a[i]+M_PI; int lb=upper_bound(ALL(a),lim+eps)-a.begin(); idx=i+1; while(idx=lim-eps)break; int rb=lower_bound(ALL(a),a[idx]+M_PI-eps)-a.begin(); ans+=max(rb-lb,0); idx++; } } printf("%lld\n",ans); return 0; }