#include <bits/stdc++.h>

using namespace std;

#define xx first
#define yy second
#define up upper_bound
#define lp lower_bound
#define mp make_pair
#define pb push_back
typedef long long ll;
typedef unsigned long long ull;
typedef string str;
typedef pair<int,int> pii;
typedef pair<long long, long long> pll;
const int MAX=10e9;
int n;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    cin>>n;
    vector<pii> v;
    for(int i=0;i<n;i++)
    {
        int x,y;
        cin>>x>>y;
        v.pb(mp(x,y));
    }
    map<pii, int> mapica;
    vector<pii> a;
    for(int i=0;i<n;i++)
    {
        for(int j=i+1;j<n;j++)
        {
            mapica[mp(v[j].xx-v[i].xx,v[j].yy-v[i].yy)]=1;
            a.pb(mp(v[j].xx-v[i].xx,v[j].yy-v[i].yy));
        }
    }
    int res=0;
    for(int i=0;i<a.size();i++)
    {
        if(mapica[mp(2*a[i].xx,2*a[i].yy)]==1 || mapica[mp(-2*a[i].xx,-2*a[i].yy)]==1)
        {
            res++;
        }
    }
    cout<<res;
    return 0;
}