#include <iostream>
#include <math.h>
typedef struct
{
	long long x, y;
}Kordinates;

bool paralelne(Kordinates t, Kordinates t1)
{
	if (t.x == 0 || t1.x == 0 || t.y == 0 || t1.y == 0)
	{
		t.x = t.x + 1;
		t1.x = t1.x + 1;
		t.y = t.y + 1;
		t1.y = t1.y + 1;
	}
	if ((-(t.x / t.y)) == (-(t1.x / t1.y)))
		return true;
	else
		return false;
	
}

int main()
{
	int n;
	std::cin >> n;
	Kordinates arr[1500];
	long long duzi[1500];
	int k = 0;
	for (int i = 0; i < n; i++)
	{
		std::cin >> arr[i].x >> arr[i].y;
	}
	for (int i = 0; i < n; i++)
	{
		for (int j = i + 1; j < n-1; j++)
		{
			if (paralelne(arr[i], arr[j]))
				k++;
		}
	}
	std::cout << k;
	return 0;
}