import java.awt.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Main {
    public static ArrayList<LinePair> pairs = new ArrayList<>();
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        int grupe = 0;
        ArrayList<Point> points = new ArrayList<>();
        for(int i = 0; i < n;i++)
        {
            String[] values = br.readLine().split(" ");
            points.add(new Point(Integer.parseInt(values[0]),Integer.parseInt(values[1])));
        }
        if(n < 4)
        {
            System.out.println(0);
        }
        else
        {
            ArrayList<Line> lines = initLines(points);
            for(int j = 0; j < lines.size();j++)
            {

                for(int k = 0; k < lines.size();k++)
                {
                    if(j != k)
                    {
                        if(tangens(lines.get(j),lines.get(k)))
                        {
                            Line line1 = lines.get(j);
                            Line line2 = lines.get(k);
                            if(getLength(line1) == getLength(line2) / 2 || getLength(line1) == getLength(line2) * 2)
                            {
                                if(!exists(new LinePair(line1,line2))) {
                                    LinePair lp = new LinePair(line1,line2);
                                    pairs.add(new LinePair(line1, line2));
                                    grupe++;
                                }
                            }
                        }
                    }
                }
            }
        }
        System.out.println(grupe);
    }
    public static boolean exists(LinePair pair)
    {
        LinePair pair2 = new LinePair(pair.l2,pair.l1);
        for(LinePair lp : pairs)
        {
            if (pair2.l1.p1 == lp.l1.p1 && pair2.l1.p2 == lp.l1.p2 && pair2.l2.p1 == lp.l2.p1 && pair2.l2.p2 == lp.l2.p2)
            {
                return true;
            }
        }
        return false;
    }


    public static ArrayList<Line> initLines(ArrayList<Point> lines)
    {
        ArrayList<Line> forReturn = new ArrayList<>();
        for(int i =0 ;i < lines.size();i++)
        {
            for(int j = i; j < lines.size();j++)
            {
                if(j != i) {
                    forReturn.add(new Line(lines.get(i), lines.get(j)));
                }
            }
        }
        return forReturn;
    }

    public static double getLength(Line line)
    {
        return Math.sqrt((line.p2.x-line.p1.x)*(line.p2.x-line.p1.x) + (line.p2.y-line.p1.y) * (line.p2.y-line.p1.y));
    }

    public static boolean tangens(Line l,Line l1)
    {
        try {
            return (l.p2.y - l.p1.y) / (l.p2.x - l.p1.x) == (l1.p2.y - l1.p1.y) / (l1.p2.x - l1.p1.x);
        }
        catch (ArithmeticException e)
        {
            return l.p2.x - l.p1.x == 0 && l1.p2.x - l1.p1.x == 0;
        }
    }
}

class Line
{
    public Point p1,p2;
    public Line(Point p1,Point p2)
    {
        this.p1 = p1;
        this.p2 = p2;
    }
}

class LinePair
{
    public Line l1,l2;
    public LinePair(Line l1,Line l2)
    {
        this.l1 = l1;
        this.l2 = l2;
    }
}