10
-2 1
2 -2
-1 -2
0 0
2 -1
0 -2
2 2
0 2
-1 -1
1 -2
 40
-8 24
2 -1
1 -18
72 -70
5 -4
-308 436
-19 40
36 -35
-178 265
-1 2
-7 30
-1 0
3 -2
200 -285
17 -16
-35 74
0 -4
-86 106
-1 4
-7 6
0 1
-5 4
-2 3
6 -5
-4 5
181 -262
76 -118
0 0
-7 18
-58 104
-5 6
-6 12
-3 4
1 0
11 -10
-86 130
-3 6
153 -236
-183 270
-33 64
 5
0 -1
0 -2
0 -3
0 -4
0 -5
 10
0 1
-1 -1
1 1
-1 0
1 -1
-2 -1
-2 2
-2 0
0 -2
0 -1
 20
-1 18
-2 5
-5 4
2 -33
9 -18
0 0
11 -22
2 0
-1 2
-4 41
1 6
1 -2
6 -12
0 1
-3 6
3 -6
3 -8
-1 4
2 -5
1 0
 10
2 1
-1 0
-2 -1
-1 1
0 2
2 -2
0 0
-2 -2
0 -2
-2 1
 20
-3 -3
0 4
-3 1
1 1
-1 2
-4 4
3 -1
-3 0
0 2
4 0
2 3
2 4
4 -3
-4 3
-1 1
1 3
-2 4
1 -2
1 -1
3 0
 3
0 0
0 -1
0 1
 10
2 1
-1 1
0 0
-3 1
-2 -3
-1 -2
-1 -1
1 2
3 -2
0 -2
 3
3 3
1 2
1 1
 4
0 0
1 0
2 0
3 0
 9
1 1
1 0
0 1
0 0
-1 0
-1 1
-1 -1
1 -1
0 -1
 7
1 1
-1 -1
1 0
0 1
-1 0
0 -1
0 0

4
 57
 4
 5
 21
 4
 10
 1
 1
 0
 2
 8
 3

#include <bits/stdc++.h>
using namespace std;
#define  ll long long int
#define	IOS ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
map<int,int>mp;
const ll N =1001000;

bool vis[100][100]= {0};

char q[30][30];  //grid

//vector <ll> v;
const int mod=998244353;
bool val(int i,int j,int n)
{
    return (i>=0 && i<n &&j>=0 && j<n);

}

int row[]= {1,0,-1,0};
int col[]= {0,-1,0,1};

string vec[]= {"forth","right","left"};

void dfs(int i,int j,int n,int m)
{
    if(vis[i][j] && q[i][j]!='-') // if index > 8
        return;

    vis[i][j]=1;
    ll x;

    for(int k=0; k<n; k++)
        for(int h=0; h<m; h++)
        {

            if(q[i][j]=='.')
                //ch[i][j]=ch[i][j]+'B';
                //else
                if(q[i][j]=='-')
                    //ch[i][j]+='-';

                    int x=i+row[h];
            int y=j+col[h];
            if( val(x,y,n) && !vis[x][y] && q[x][y]=='1'  )
                dfs(x,y,n,m);

        }

}


int lcm(int n,int m)
{
    return (n/__gcd(n,m))*m;

}
 bool isPrime[100000+12];
void sieve()
{

    for (int i = 1; i<= 1e5+10; ++i) {
        isPrime[i] = true;
    }

    isPrime[1] = false;
    isPrime[2] = true;

    for (int i = 2; i * i <= 1e5+10; ++i) {


        if (isPrime[i] == true) {
            for (int j = i+i; j <= 1e5+10; j += i)
                isPrime[j] = false;
        }
    }
}

ll fpow(ll a,ll k){
    ll res=1;
    while(k){
        if(k&1) res=(res*a)%mod;
        k>>=1;
        a=a*a%mod;
        //cout<<1<<endl;
    }
    return res;
}
int main()
{

int n;cin>>n;

set<pair<int,int>>s;
vector<pair<int,int>>v;
for(int i=0;i<n;i++){

    int x,y;cin>>x>>y;
    s.insert({x,y});
    v.push_back({x,y});
}
int sol=0;
for(int i=0;i<v.size();i++){
        for(int j=i+1;j<s.size()-1;j++){
    int x1,y1;
    x1=v[j].first+v[j+1].first;

    y1=v[j].second+v[j+1].second;
    x1/=2;y1/=2;
    if((x1&1)||(y1&1))continue;
    else {

        if(s.find({x1,y1})!=s.end())sol++;


    }
        }



}
 cout<<sol;




}






