#include <iostream>
#include <fstream>
#include <algorithm>
#include <math.h>
#define eps 1e-3
using namespace std;
ifstream fin("triang.in");
ofstream fout("triang.out");
int n, nr = 0, st;
struct punct
{
double x, y;
} p[1505];
bool cmp_sort(punct a, punct b)
{
if (a.x == b.x)
return a.y < b.y;
else
return a.x < b.x;
}
bool cmp(punct a, punct b)
{
if (abs(a.x - b.x) < eps)
return a.y < b.y - eps;
else
return a.x < b.x - eps;
}
int cautare_binara(punct c)
{
int i, step;
for (step = 1; step <= n / 2; step <<= 1)
;
for (i = st; step; step >>= 1)
{
if (i + step <= n && cmp(c, p[i + step]) == 0)
i += step;
}
if (abs(c.x - p[i].x) < eps && abs(c.y - p[i].y) < eps)
return 1;
else
return 0;
}
int main()
{
cin >> n;
for (int i = 1; i <= n; i++)
{
cin >> p[i].x >> p[i].y;
}
sort(p + 1, p + n + 1, cmp_sort);
for (int i = 1; i < n; i++)
{
for (int j = i + 1; j <= n; j++)
{
st = j;
double dx = p[j].x - p[i].x;
double dy = p[j].y - p[i].y;
double mx = (p[i].x + p[j].x) / 2;
double my = (p[i].y + p[j].y) / 2;
double h = sqrt(3.0) / 2;
punct c1, c2;
c1.x = mx - dy * h;
c1.y = my + dx * h;
c2.x = mx + dy * h;
c2.y = my - dx * h;
nr = nr + cautare_binara(c1) + cautare_binara(c2);
}
}
cout << nr;
return 0;
}