#include <bits/stdc++.h>

using namespace std;
bool paralelne(double x[], double y[], int i, int j, int p, int q)
{
    ///napravimo k od j-na pravih AB i CD
    double k1 = (y[j]-y[i])/(x[j]-x[i]);
    double k2 = (y[q]-y[p])/(x[q]-x[p]);
    if(k1==k2)
        return true;
    k1 = (y[p]-y[i])/(x[p]-x[i]);
    k2 = (y[q]-y[j])/(x[q]-x[j]);
    if(k1==k2)
        return true;
    k1 = (y[q]-y[i])/(x[q]-x[i]);
    k2 = (y[j]-y[p])/(x[j]-x[p]);
    if(k1==k2)
        return true;
    return false;
}
bool duplo(double x[], double y[], int i, int j, int p, int q)
{
    double AB = abs(y[j]-y[i])*abs(y[j]-y[i]) + abs(x[j]-x[i])*abs(x[j]-x[i]);
    double CD = abs(y[q]-y[p])*abs(y[q]-y[p]) + abs(x[q]-x[p])*abs(x[q]-x[p]);
    if(AB==4*CD || CD == 4*AB)
        return true;
    AB = abs(y[p]-y[i])*abs(y[p]-y[i]) + abs(x[p]-x[i])*abs(x[p]-x[i]);
    CD = abs(y[q]-y[j])*abs(y[q]-y[j]) + abs(x[q]-x[j])*abs(x[q]-x[j]);
    if(AB==4*CD || CD == 4*AB)
        return true;
    AB = abs(y[q]-y[i])*abs(y[q]-y[i]) + abs(x[q]-x[i])*abs(x[q]-x[i]);
    CD = abs(y[j]-y[p])*abs(y[j]-y[p]) + abs(x[j]-x[p])*abs(x[j]-x[p]);
    if(AB==4*CD || CD == 4*AB)
        return true;
    return false;
}

int main()
{
    int n;
    cin>>n;
    double x[n],y[n];
    for(int i=0; i<n; i++){
        cin>>x[i]>>y[i];
    }
    int br = 0;
    if(n>=4){
        for(int i=0; i<n-3; i++){
            for(int j=i+1; j<n-2; j++){
                for(int p=j+1; p<n-1; p++){
                    for(int q=p+1; q<n; q++){
                        if(paralelne(x,y,i,j,p,q) && duplo(x,y,i,j,p,q)){
                            br++;
                        }
                    }
                }
            }
        }
    }
    else{
        br=0;
    }
    cout<<br;
}