#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];
map<pii, set<int>> m;
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++) {
            int pr=tac[j].xx-tac[i].xx;
            int dr=tac[j].yy-tac[i].yy;
            if(pr<0) {
                pr*=-1;
                dr*=-1;
            }
            else if(pr==0 && dr<0) {
                dr*=-1;
            }
            int d=__gcd(abs(pr), abs(dr));
            m[{pr/d, dr/d}].insert(pr+abs(dr));
        }
    }
    for(auto it=m.begin(); it!=m.end(); it++) {
        pii sta=it->first;
        for(auto y:m[sta]) {
            if(m[sta].count(2*y)) ++br;
        }
    }
    cout << br;
    return 0;
}