#include <iostream>
#include <algorithm>
#include <vector>
#include<string>  
using namespace std;

int main()
{
    int n;
    cin >> n;
    int k, k2;
    int brojac = 0;
    double razdaljina1, razdaljina2;
    bool pronadjeno = false;
    string key;
    vector<pair<int, int>> koo(n);
    vector<pair<string, int>> bibl;
    for (int i = 0; i < n;i++) {
        cin >> koo[i].first >> koo[i].second;
    }
    for (int i = 0; i < n;i++) {
        for (int m = i;m < n;m++) {
            int x1 = koo[i].first;
            int y1 = koo[i].second;
            int x2 = koo[m].first;
            int y2 = koo[m].second;
            pronadjeno = false;
            key = to_string(koo[i].first)+to_string(koo[i].second) + "_" + to_string(koo[m].first)+ to_string(koo[m].second);
            for (int z = 0; z < bibl.size();z++) {
                if (key == bibl[z].first) {
                    k = bibl[z].second;
                    pronadjeno = true;
                    break;//nez da li izlazi iz celog lupa ili samo ovog manjeg
                }
            }
            if (!pronadjeno) {
                if (x1 - x2 == 0) {
                    k = 0;
                }
                else {
                    k = (y1 - y2) / (x1 - x2);
                }
                bibl.push_back(make_pair(key, k));
            }
            //razdaljina
            if (x1 == x2) {
                razdaljina1 = abs(y1 - y2);
            }
            else if (y1 == y2) {
                razdaljina1 = abs(x1 - x2);
            }
            else {
                int a = abs(x1 - x2);
                int b = abs(y1 - y2);
                razdaljina1 = sqrt(a * a + b * b);
            }

            //ovde pocinje druga stvar
            for (int z = 0; z < n;z++) {
                for (int y = z;y < n;y++) {
                    int x11 = koo[z].first;
                    int y11 = koo[z].second;
                    int x21 = koo[y].first;
                    int y21 = koo[y].second;
                    if (z == i || z == m || y == i || y == m || z == y) {
                        continue;
                    }                   
                    key = koo[z].first + koo[z].second + "_" + koo[y].first + koo[y].second;
                    for (int p = 0; p < bibl.size();p++) {
                        if (key == bibl[p].first) {
                            k2 = bibl[p].second;
                            pronadjeno = true;
                            break;//nez da li izlazi iz celog lupa ili samo ovog manjeg
                        }
                    }
                    if (!pronadjeno) {
                        if (x11 - x21 == 0) {
                            k2 = 0;
                        }
                        else {
                            k2 = (koo[z].second - koo[y].second) / (koo[z].first - koo[y].first);
                        }
                        bibl.push_back(make_pair(key, k));
                    }

                    //razdaljina 
                    if (x11 == x21) {
                        razdaljina2 = abs(y11 - y21);
                    }
                    else if (y11 == y21) {
                        razdaljina2 = abs(x11 - x21);
                    }
                    else {
                        int a1 = abs(x11 - x21);
                        int b1 = abs(y11 - y21);
                        razdaljina2 = sqrt(a1 * a1 + b1 * b1);
                    }
                    if (k2 == k && (razdaljina1 == razdaljina2+razdaljina2 || razdaljina2 == razdaljina1 + razdaljina1)) {
                        brojac++;
                    }
                }

            }

        }
    }
    cout << brojac/2 << endl;
	//EZ
}