#include <iostream>
#include <algorithm>
#define MAXN 1200000

using namespace std;

struct kordinate
{
	int cord_x;
	int cord_y;
};

struct vrednosti
{
	int k;
	int len;
};

kordinate cords[MAXN];
vrednosti values[MAXN];

int main()
{
	int a;
	cin>>a;
	int br_duzi=0;
	int rez=0;
	for(int i=0;i<a;i++) cin>>cords[i].cord_x>>cords[i].cord_y;
	for(int i=0;i<a;i++)
	{
		for(int j=i+1;j<a;j++)
		{
			if(cords[j].cord_x!=cords[i].cord_x) values[br_duzi].k=(cords[j].cord_y-cords[i].cord_y)/(cords[j].cord_x-cords[i].cord_x);
			else values[br_duzi].k=0;
			values[br_duzi].len=sqrt(pow(abs(cords[j].cord_y-cords[i].cord_y),2)+pow(abs(cords[j].cord_x-cords[i].cord_x),2));
			br_duzi++;
		}
	}
	for(int i=0;i<br_duzi;i++)
	{
		for(int j=i+1;j<br_duzi;j++)
		{
			if(values[i].k==values[j].k && (values[i].len*2==values[j].len || values[i].len==2*values[j].len))
			{
				rez++;
			}
		}
	}
	cout<<rez;
	return 0;
}