#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    vector<pair<ll,ll>> a(n);
    for(auto &&[x, y] : a){
        cin >> x >> y;
        x *= 2, y *= 2;
    }
    vector<tuple<ll,ll,ll,ll>> b, c;
    for(int i = 0; i < n; i++){
        auto &&[x1, y1] = a[i];
        for(int j = i + 1; j < n; j++){
            auto &&[x2, y2] = a[j];
            ll dx = x2 - x1;
            ll dy = y2 - y1;
            ll g = gcd(abs(dx), abs(dy));
            dx /= g, dy /= g;
            if(dx < 0) dx *= -1, dy *= -1;
            if(dx == 0) dy = abs(dy);
            if(dy == 0) dx = abs(dx);
            b.emplace_back((x1 + x2) / 2, (y1 + y2) / 2, dx, dy);
            dy *= -1;
            swap(dx, dy);
            if(dx < 0) dx *= -1, dy *= -1;
            if(dx == 0) dy = abs(dy);
            if(dy == 0) dx = abs(dx);
            c.emplace_back((x1 + x2) / 2, (y1 + y2) / 2, dx, dy);
        }
    }
    sort(c.begin(), c.end());
    ll ans = 0;
    for(auto &&tup : b){
        ans += upper_bound(c.begin(), c.end(), tup)
            - lower_bound(c.begin(), c.end(), tup);
    }
    cout << ans / 2 << '\n';
}