using System;

namespace Kvalifikacije
{
    class Program
    {
        static bool ispitaj(int x1,int x2,int x3, int x4, int y1, int y2, int y3, int y4)
        {
            int a, b, c, d;
            a = Math.Abs(x1 - x2); b = Math.Abs(y1 - y2); c = Math.Abs(x3 - x4); d = Math.Abs(y3 - y4);
            if ((2 * a == c && 2 * b == d) || (2 * c == a && 2 * d == b))
                return true;
            a = Math.Abs(x1 - x3); b = Math.Abs(y1 - y3); c = Math.Abs(x2 - x4); d = Math.Abs(y2 - y4);
            if ((2 * a == c && 2 * b == d) || (2 * c == a && 2 * d == b))
                return true;
            a = Math.Abs(x2 - x3); b = Math.Abs(y2 - y3); c = Math.Abs(x1 - x4); d = Math.Abs(y1 - y4);
            if ((2 * a == c && 2 * b == d) || (2 * c == a && 2 * d == b))
                return true;
            return false;

        }
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int[] x = new int[n];
            int[] y = new int[n];
            for(int i = 0; i < n; i++)
            {
                string[] q = Console.ReadLine().Split();
                x[i] = int.Parse(q[0]);
                y[i] = int.Parse(q[1]);
            }
            int brojac = 0;
            for (int i = 0; i < n - 3; i++)
                for (int j = i + 1; j < n - 2; j++)
                    for (int k = j + 1; k < n - 1; k++)
                        for (int l = k + 1; l < n; l++)
                            if (ispitaj(x[i], x[j], x[k], x[l], y[i], y[j], y[k], y[l])) brojac++;
            Console.WriteLine(brojac);
        }
    }
}