#include <bits/stdc++.h>
using namespace std;
ifstream fin ("patrate3.in");
ofstream fout ("patrate3.out");
set <pair<int, int>> M;
pair <int, int> a[10005];
int main()
{
fin.tie ();
ios_base::sync_with_stdio(false);
int n, cnt = 0;
fin >> n;
for (int i = 1; i <= n; i++)
{
double x , y;
fin >> x >> y;
int int_x = round(x * 10000);
int int_y = round(y * 10000);
a[i] = {int_x, int_y};
M.insert({int_x, int_y});
}
for (int i = 1; i <= n; i++)
for (int j = 1; j <= n; j++)
{
if (i != j)
{
pair <int,int> C, D;
C.first = a[i].first + (a[i].second - a[j].second);
C.second = a[i].second + (a[j].first - a[i].first);
D.first = a[j].first + (a[i].second - a[j].second);
D.second = a[j].second + (a[j].first - a[i].first);
if (M.find (C) != M.end () && M.find (D) != M.end ())
cnt++;
}
}
fout << cnt / 4 << "\n";
return 0;
}