#include <iostream>
#include <string>
#include <vector>
#include <unordered_map>

int main()
{
    //dynamic programming :D
    int n;
    std::cin >> n;
    std::unordered_map<int, std::unordered_map<int, bool>> seen;
    //dist, x, y, coef
    std::unordered_map<int, std::unordered_map<int, std::unordered_map<int, int>>> distance;

    //std::vector<std::vector<int>> res;
    int res = 0;

    for (int i = 0; i < n; i++) {
        int t1, t2;
        std::cin >> t1 >> t2;
        seen[t1][t2] = true;
    }

    /*for (auto i = seen.begin(); i != seen.end(); i++) {
        int x1 = i->first;
        auto m2 = i->second;
        for (auto j = m2.begin(); j != m2.end(); j++) {
            int y1 = j->first;
            for (auto i1 = seen.begin(); i1 != seen.end(); i1++) {
                int x2 = i1->first;
                auto m3 = i1->second;
                for (auto j1 = m3.begin(); j1 != m3.end(); j1++) {
                    int y2 = j1->first;
                    if (x1 != y2) {
                        for (auto i2 = seen.begin(); i2 != seen.end(); i2++) {
                            int x1 = i2->first;
                            auto m4 = i2->second;
                            for (auto j2 = m4.begin(); j2 != m2.end(); j2++) {
                                int y1 = j2->first;
                                for (auto i1 = seen.begin(); i1 != seen.end(); i1++) {
                                    int x2 = i1->first;
                                    auto m3 = i1->second;
                                    for (auto j1 = m3.begin(); j1 != m3.end(); j1++) {
                                        int y2 = j1->first;
                                        if (x1 != y2) {

                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }*/

    //O(n^2)
    for (auto i = seen.begin(); i != seen.end(); i++) {
        int x1 = i->first;
        auto m2 = i->second;
        for (auto j = m2.begin(); j != m2.end(); j++) {
            int y1 = j->first;

            for (auto k = seen.begin(); k != seen.end(); k++) {
                int x2 = k->first;
                auto m3 = k->second;
                for (auto o = m3.begin(); o != m3.end(); o++) {
                    int y2 = o->first;

                    int tt = floorf(sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)) * 100);
                    int coef = 0;
                    if ((x1 - x2) == 0) {
                        coef = -457456;
                    }
                    else {
                        coef = (int)floorf(((float)(y1 - y2) / (x1 - x2)) * 100);
                    }
                    distance[tt][x1][y1] = coef;
                }
            }

        }
    }

    //O(n^3)?
    for (auto i = seen.begin(); i != seen.end(); i++) {
        int x1 = i->first;
        auto m2 = i->second;
        for (auto j = m2.begin(); j != m2.end(); j++) {
            int y1 = j->first;

            for (auto k = seen.begin(); k != seen.end(); k++) {
                int x2 = k->first;
                auto m3 = k->second;
                for (auto o = m3.begin(); o != m3.end(); o++) {
                    int y2 = o->first;
                    if (x1 != x2 || y1 != y2) {
                        int dist = (int)floorf(sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)) * 100);

                        int desiredDistance = dist * 2;

                        //std::cout << "[" << x1 << " " << y1 << "] [" << x2 << " " << y2 << "] " << dist << " " << distance[desiredDistance].size() << std::endl;

                        for (auto m = distance[desiredDistance].begin(); m != distance[desiredDistance].end(); m++) {
                            auto m4 = m->second;
                            for (auto l = m4.begin(); l != m4.end(); l++) {
                                //std::cout << "[" << x1 << " " << y1 << "] [" << x2 << " " << y2 << "]99999999999999 " << desiredDistance << " " << desiredDistance << " " << l->second << " " << distance[dist][x2][y2] << " " << distance[dist][x1][y1] << std::endl;
                                if ((l->second >= distance[dist][x1][y1]-10 && l->second <= distance[dist][x1][y1] + 10 || l->second >= distance[dist][x2][y2] - 10 && l->second <= distance[dist][x2][y2] + 10)) {
                                    res++;
                                }
                            }
                        }
                    }
                }
            }

        }
    }

    std::cout << (res) / 4 << std::endl;

}