#include <bits/stdc++.h>

using namespace std;

#define ll long long
const ll MAXN=1e6+5,INF=1e8,MOD=1e9+7;
const double EPS=1e-9;
#define fi first
#define se second
#define pll pair<ll,ll>
#define pii pair<int,int>
#define mid (l+r)/2
#define sz(a) int((a).size())
#define all(a) a.begin(),a.end()
#define mod 1000000007LL
#define pb push_back
#define endl "\n"
#define PRINT(x) cerr<<#x<<'-'<<x<<endl<<flush;
#define getunique(v) {sort(all(v)); v.erase(unique(all(v)), v.end());}
#define pb push_back
#define pf push_front
#define ppf pop_front
#define ppb pop_back
#define PRINTvec(x) { cerr<<#x<<"-"; for(int i=0;i<sz(x);i++) cerr<<x[i]<<" "; cerr<<endl; }
#define bit(x) (1<<x)

ll n,m,k,q,x,y,z,l,r,res=0;
string s,t;
ifstream in;
ofstream out;

#ifdef ONLINE_JUDGE
    #define in cin
    #define out cout
#endif

struct tacka{
    ll x,y;
    void input(){
        cin>>x>>y;
    }
    void output(){
        cout<<"("<<x<<","<<y<<")"<<endl;
    }
};

vector<tacka> a;

ll f(pii p){
    return INF*p.fi+(long long)p.se;
}

void solve(){
    cin>>n;
    a.resize(n);
    for(int i=0;i<n;i++) a[i].input();
    unordered_map<ll,short> m;
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            m[f({a[i].x-a[j].x,a[i].y-a[j].y})]++;
        }
    }
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            if(i==j) continue;
            int x=a[i].x-a[j].x,y=a[i].y-a[j].y;
            if(x%2!=0 || y%2!=0) continue;
            res+=m[f({x/2,y/2})];
        }
    }
    cout<<res/2<<endl;
}

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    #ifndef ONLINE_JUDGE
        in.open("D:\\UROS\\Programiranje\\input.in",ios::in);
        out.open("D:\\UROS\\Programiranje\\output.out",ios::trunc | ios::out);
    #endif
    //freopen(".in","r",stdin);
    //freopen(".out","w",stdout);'
    int t;
    ///cin>>t;
    t=1;
    while(t--){
        solve();
    }
    return 0;
}