#include <iostream>
#include <fstream>
#include <set>
#include <cmath>
#define nl '\n'
using namespace std;
ifstream fin("triang.in");
ofstream fout("triang.out");
const double eps = 1e-3;
const int NMAX = 1505;
int n, ans;
struct point
{
double x, y;
bool operator <(const point& a) const
{
if (abs(x-a.x) > eps)
return x < a.x;
if (abs(y-a.y) > eps)
return y < a.y;
return 0;
}
};
point points[NMAX];
set<point> s;
point rota(const point& a, const point& b)
{
double cos = 1.0/2, sin = sqrt(3)/2;
point c;
c.x = a.x+(b.x-a.x)*cos-(b.y-a.y)*sin;
c.y = a.y+(b.x-a.x)*sin+(b.y-a.y)*cos;
return c;
}
int main()
{
fin >> n;
for (int i = 1; i <= n; i++)
{
fin >> points[i].x >> points[i].y;
for (int j = 1; j < n; j++)
if (s.find(rota(points[i], points[j])) != s.end())
ans++;
s.insert(points[i]);
}
fout << ans;
return 0;
}