#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 main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    tacka tacke[n];
    map<double, vector<double> > linije;
    vector<double> v;
    cin >> tacke[0].x >> tacke[0].y;
    double p, d;
    int brTrapeza = 0;
    for(int i = 1;i < n;i++) {
        cin >> tacke[i].x >> tacke[i].y;
        for(int j = i-1;j >= 0;j--) {
            p = pom(tacke[i], tacke[j]);
            d = duzina(tacke[i], tacke[j]);
            if(linije.find(p) != linije.end()) {
                v = linije[p];
                for(int k = 0;k < v.size();k++)
                    if(v[k] == 2*d || 2*v[k] == d) {
                        brTrapeza++;
                        break;
                    }
            }
            else
                linije[p].push_back(d);
        }
    }
    cout << brTrapeza;;
    return 0;
}