#include <iostream>
//#include <fstream>
//#include <iomanip>
#include <cmath>
//#include <algorithm>
//#include <string>
//#include <vector>
//#include <utility>
//#include <map>
//#include <ctime>
//#include <cctype>
//#include <cstdlib>
//#include <limits>
//#include <numeric>
//#include <mycpp.h>

using namespace std;

struct Tacka
{
	int x, y;
};

bool Paralelne(Tacka A1, Tacka A2, Tacka B1, Tacka B2)
{
	return ((A1.x == A2.x) && (B1.x == B2.x)  || 
		   ( (double)(A1.y - A2.y) / (A1.x - A2.x) == (double)(B1.y - B2.y) / (B1.x - B2.x)));
}

double Rastojanje(Tacka A, Tacka B)
{
	return sqrt(pow(A.x - B.x, 2) + pow(A.y - B.y, 2));
}

bool TrapezTacno(Tacka A, Tacka B, Tacka C, Tacka D)
{
	double a = Rastojanje(A, B);
	double b = Rastojanje(C, D);
	return (Paralelne(A, B, C, D) && (a == 2 * b || 2 * a == b));
}

bool Trapez(Tacka A, Tacka B, Tacka C, Tacka D)
{
	return (TrapezTacno(A, B, C, D) ||
			TrapezTacno(A, C, B, D) ||
			TrapezTacno(A, D, B, C));
}

int main()
{
	std::ios_base::sync_with_stdio(false);
	int n;
	cin >> n;
	Tacka tacke[n];
	for(int i = 0; i < n; i++)
		cin >> tacke[i].x >> tacke[i].y;
	if(n < 4)
		cout << "0" << endl;
	else if(n == 4)
		cout << Trapez(tacke[0], tacke[1], tacke[2], tacke[3]);
	else
	{
		int br = 0;
		for(int i = 0; i < n - 3; i++)
			for(int j = i + 1; j < n - 2; j++)
				for(int k = j + 1; k < n - 1; k++)
					for(int l = k + 1; l < n; l++)
						if(Trapez(tacke[i], tacke[j], tacke[k], tacke[l]))
							br++;
		cout << br << endl;
	}
}