#include<bits/stdc++.h>
#define ios ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define dec(x, y) fixed << setprecision((y)) << (x)
#define xx first
#define yy second
#define srt(v) sort((v).begin(), (v).end())
#define srtr(v) sort((v).rbegin(), (v).rend())
#define pb push_back
#define popb pop_back
#define sz(a) (int)(a).size()
#define len(a) (int)(a).length()
#define mp make_pair

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

int n, br;
pll tac[1502];
set<pair<ll, pii>> s;
int main() {
    ios;
    cin >> n;
    for(int i=0; i<n; i++) cin >> tac[i].xx >> tac[i].yy;
    for(int i=0; i<n; i++) {
        for(int j=i+1; j<n; j++) {
            ll pr=tac[j].xx-tac[i].xx;
            ll dr=tac[j].yy-tac[i].yy;
            s.insert({pr*pr+dr*dr, {i, j}});
        }
    }
    for(auto it=s.begin(); it!=s.end(); it++) {
        pair<ll, pii> taj=*it;
        auto it1=s.lower_bound({4LL*taj.xx, {0, 0}});
        auto it2=s.lower_bound({4LL*taj.xx+1LL, {0, 0}});
        for(; it1!=it2; ++it1) {
            pair<ll, pii> taj1=*it1;
            if((tac[taj.yy.xx].xx-tac[taj.yy.yy].xx)*(tac[taj1.yy.xx].yy-tac[taj1.yy.yy].yy)==(tac[taj.yy.xx].yy-tac[taj.yy.yy].yy)*(tac[taj1.yy.xx].xx-tac[taj1.yy.yy].xx)) ++br;
        }
    }
    cout << br;
    return 0;
}