#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define ll long long
#define ld long double
using namespace std;

double distanceFrom(int x1, int y1, int x2, int y2)
{

    double d = pow((x1-x2),2) + pow((y1-y2),2);
    return sqrt(d);
}

bool paralelne(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
{
    double k1,k2;
    if(x1==x2 && x3==x4)
    {
        return true;
    } else if(y1==y2 && y3==y4)
    {
        return true;
    }

    if(x1==x2 && x3!=x4 || x1!=x2 && x3==x4)
    {
        return false;
    } else if(y1 == y2 && y3!=4 || y1 != y2 && y3 == y4)
    {
        return false;
    }

    k1 = (y1-y2)/(x1-x2);
    k2 = (y3-y4)/(x3-x4);

    if(k1==k2) return true;
    else return false;
}

int main()
{
    int n;
    cin >> n;

    vector<pair<int,int>> v;
    for(int i = 0; i < n; i++)
    {
        int k,l;
        cin >> k >> l;
        v.pb(mp(k,l));
    }
    int sol = 0;
    int prev1,prev2;
    for(int i = 0; i < v.size(); i++)
    {
        for(int j = i; j < v.size(); j++)
        {
            if(i==j) continue;
            double d = distanceFrom(v[i].first, v[i].second, v[j].first, v[j].second);
            for(int k = 0; k < v.size(); k++)
            {
                if(i==k || j==k) continue;
                for(int l = k+1; l < v.size(); l++)
                {
                    if(i==l || j==l) continue;

                    if(paralelne(v[i].first, v[i].second, v[j].first, v[j].second, v[k].first, v[k].second, v[l].first, v[l].second)) {
                        double d2 = distanceFrom(v[k].first, v[k].second, v[l].first, v[l].second);
                        if(d==2*d2 || d2==2*d)
                        {
                            sol++;
                        }
                    }
                }
            }
        }
    }

    cout << sol/2;
}