using System;

class Program
{
    struct tacka
    {
        public int x;
        public int y;
    }
    public static void Main(string[] args)
    {
        int brojTakmmicara = int.Parse(Console.ReadLine());
        tacka[] koordinate = new tacka[brojTakmmicara];
        tacka[] abcd = new tacka[4];
        for (int i = 0; i < brojTakmmicara; i++)
        {
            string[] s1 = Console.ReadLine().Split();
            koordinate[i].x = int.Parse(s1[0]);
            koordinate[i].y = int.Parse(s1[1]);
        }
        int br = 0;
        Console.WriteLine(Kombinacije(koordinate, abcd));
    }
    static double Nagib(tacka a, tacka b)
    {
        if (a.x - b.y == 0)
            return 0;

        else
            return (a.y - b.x) / (a.x - b.y);
    }
    static bool Trapez(tacka a, tacka b, tacka c, tacka d)
    {
        if (Nagib(a, b) == Nagib(c, d))
        {
            if ((2 * Math.Sqrt(Math.Pow(a.x - b.x, 2) + Math.Pow(a.y - b.y, 2)) == Math.Sqrt(Math.Pow(c.x - d.x, 2) + Math.Pow(c.y - d.y, 2))) || (Math.Sqrt(Math.Pow(a.x - b.x, 2) + Math.Pow(a.y - b.y, 2)) == 2 * Math.Sqrt(Math.Pow(c.x - d.x, 2) + Math.Pow(c.y - d.y, 2))))
            {
                return true;
            }
        }
        if (Nagib(a, c) == Nagib(b, d))
        {
            if ((2 * Math.Sqrt(Math.Pow(a.x - c.x, 2) + Math.Pow(a.y - c.y, 2)) == Math.Sqrt(Math.Pow(b.x - d.x, 2) + Math.Pow(b.y - d.y, 2))) || (Math.Sqrt(Math.Pow(a.x - c.x, 2) + Math.Pow(a.y - c.y, 2)) == 2 * Math.Sqrt(Math.Pow(b.x - d.x, 2) + Math.Pow(b.y - d.y, 2))))
            {
                return true;
            }
        }
        if (Nagib(b, c) == Nagib(a, d))
        {
            if ((2 * Math.Sqrt(Math.Pow(b.x - c.x, 2) + Math.Pow(b.y - c.y, 2)) == Math.Sqrt(Math.Pow(a.x - d.x, 2) + Math.Pow(a.y - d.y, 2))) || (Math.Sqrt(Math.Pow(b.x - c.x, 2) + Math.Pow(b.y - c.y, 2)) == 2 * Math.Sqrt(Math.Pow(a.x - d.x, 2) + Math.Pow(a.y - d.y, 2))))
            {
                return true;
            }
        }
        return false;
    }
    static void Kombinacije(tacka[] koordinate, tacka[] abcd, int i, int j, ref int br)
    {
        if (i == 4)
        {
            if (Trapez(abcd[0], abcd[1], abcd[2], abcd[3])) br++;
            return;
        }
        if (j >= koordinate.Length) return;
        abcd[j] = koordinate[i];
        Kombinacije(koordinate, abcd, i + 1, j + 1, ref br);
        Kombinacije(koordinate, abcd, i, j + 1, ref br);
    }
    static int Kombinacije(tacka[] koordinate, tacka[] abcd)
    {
        int br = 0;
        Kombinacije(koordinate,abcd,0,0,ref br);
        return br;
    }

}