#include <bits/stdc++.h>

using namespace std;

struct tacka {
    int x, y;
};

double pom(tacka a, tacka b) {
    if(b.x - a.x == 0)
        return 3.14159265359;
    return (b.y - a.y)/(b.x - a.x);
}

double duzina(tacka a, tacka b) {
    return sqrt((b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y));
}

int resi(tacka tacke[], int n) {
    int brTrapeza = 0;
    double p;
    map<double, vector<double> > linije;
    for(int i = 0;i < n;i++)
        for(int j = i+1;j < n;j++)
            linije[pom(tacke[i], tacke[j])].push_back(duzina(tacke[i], tacke[j]));
    map<double, vector<double> >::iterator it;
    vector<double> pom;
    for(it = linije.begin();it != linije.end();++it) {
        pom =  it->second;
        for(int i = 0;i < pom.size();i++)
            for(int j = i+1;j < pom.size();j++)
                if(pom[i] == 2*pom[j] || 2*pom[i] == pom[j])
                    brTrapeza += 1;
    }
    return brTrapeza;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    tacka tacke[n];
    for(int i = 0;i < n;i++)
        cin >> tacke[i].x >> tacke[i].y;
    cout << resi(tacke, n);
    return 0;
}