#include <iostream>

using namespace std;

bool sumnjivo(long long int x1, long long int x2, long long int x3, long long int x4,
	long long int y1, long long int y2, long long int y3, long long int y4 )
{
	long long int a, b;
	if (y2 * x4 - y2 * x3 - y1 * x4 + y1 * x3 == y4 * x2 - y4 * x1 - y3 * x2 + y3 * x1)
	{
		a = (y2 - y1) * (y2 - y1) + (x2 - x1) * (x2 - x1);
		b = (y4 - y3) * (y4 - y3) + (x4 - x3) * (x4 - x3);
		if (a == 4 * b || b == 4 * a)
			return true;
	}
	else if (y3 * x4 - y3 * x2 - y1 * x4 + y1 * x2 == y4 * x3 - y4 * x1 - y2 * x3 + y2 * x1)
	{
		a = (y3 - y1) * (y3 - y1) + (x3 - x1) * (x3 - x1);
		b = (y4 - y2) * (y4 - y2) + (x4 - x2) * (x4 - x2);
		if (a == 4 * b || b == 4 * a)
			return true;
	}
	else if (y4 * x3 - y4 * x2 - y1 * x3 + y1 * x2 == y3 * x4 - y3 * x1 - y2 * x4 + y2 * x1)
	{
		a = (y4 - y1) * (y4 - y1) + (x4 - x1) * (x4 - x1);
		b = (y2 - y3) * (y2 - y3) + (x2 - x3) * (x2 - x3);
		if (a == 4 * b || b == 4 * a)
			return true;
	}

	return false;
}

int main()
{
	int n;
	long long int x[1500];
	long long int y[1500];
	int i, j, k, l;
	long long sus = 0;

	cin >> n;
	for (i = 0; i < n; i++)
	{
		cin >> x[i] >> y[i];
	}
	if (n < 4)
	{
		cout << "0";
		return 0;
	}

	for (i = 0; i < n - 3; i++)
	{
		for (j = i + 1; j < n - 2; j++)
		{
			for (k = j + 1; k < n - 1; k++)
			{
				for (l = k + 1; l < n; l++)
				{
					//cout << i + 1 << j + 1 << k + 1 << l + 1 << endl;
					if (sumnjivo(x[i], x[j], x[k], x[l], y[i], y[j], y[k], y[l]))
						sus++;
				}
			}
		}
	}

	cout << sus;

	return 0;
}