#include <stdio.h>
#include <math.h>

double stranica(int x1, int y1, int x2, int y2);

main()
{
	int N;
	scanf("%d", &N);
	int x[N], y[N], i, j, c;
	double d[N*N];
	
	for (i = 0; i < N; i++)
	{
		scanf("%d %d", &x[i], &y[i]);	
	}	
	
	for (i = 0; i < N-1; i++)
	{
		for (j = 1; j < N; j++)
		{
			d[j] = stranica(x[i], y[i], x[j], y[j]);
			if (2*d[i] == d[j]) c++;
		}
	}
	
	printf("%d", c);
}

double stranica(int x1, int y1, int x2, int y2)
{
	double d = sqrt(pow((x2-x1),2) + pow((y2-y1),2));
}