#include <bits/stdc++.h>

using namespace std;

#define PI 3.14159265

float ugao(pair<int, int> a, pair<int, int> b)
{
    float k = ((float)a.second - (float)b.second) / ((float)a.first - (float)b.first);
    float rez = atan(k) * 180 / PI;
    if(rez == -90)
        return 90;
    else
        return rez;
}


float pitagorina(pair<int, int> a, pair<int, int> b)
{
    float x = (float)a.first - (float)b.first;
    float y = (float)a.second - (float)b.second;
    return sqrt(x*x + y*y);
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cerr.tie(NULL);
    cout.tie(NULL);

    int n;
    cin >> n;
    pair<int, int> ucenici[n];
    for(int i = 0; i < n; i++) cin >> ucenici[i].first >> ucenici[i].second;

    map<float, vector<float>> duzi;
    float k, d;
    int rez = 0;
    for(int i = 0; i < n; i++)
    {
        for(int j = i+1; j < n; j++)
        {
            k = ugao(ucenici[i], ucenici[j]);
            d = pitagorina(ucenici[i], ucenici[j]);
            if(duzi.find(k) != duzi.end())
            {
                for(int m = 0; m < (int)duzi[k].size(); m++)
                {
                    if(duzi[k][m] == 2*d || 2*duzi[k][m] == d)
                        rez++;
                }
                duzi[k].push_back(d);
            }
            else
            {
                vector<float> newVector = {d};
                duzi.insert(make_pair(k, newVector));
            }
        }
    }
    cout << rez << endl;
    return 0;
}