using System;

class Program {
  struct Tacka
  {
    public int x;
    public int y;
  }
  static double Nagib(Tacka t1, Tacka t2)
  {
    double a;
    if(t1.x-t2.y == 0) a = 0;
    else a = (t1.y-t2.x)/(t1.x-t2.y);
    return a;
  }
  static bool Trapez(Tacka t1, Tacka t2, Tacka t3, Tacka t4)
  {
    if(Nagib(t1, t2) == Nagib(t3, t4))
    {
      if(Math.Sqrt(Math.Pow(t1.x-t2.x, 2)+Math.Pow(t1.y-t2.y, 2)) == 2*Math.Sqrt(Math.Pow(t3.x-t4.x, 2)+Math.Pow(t3.y-t4.y, 2)) || Math.Sqrt(Math.Pow(t3.x-t4.x, 2)+Math.Pow(t3.y-t4.y, 2)) == 2*Math.Sqrt(Math.Pow(t1.x-t2.x, 2)+Math.Pow(t1.y-t2.y, 2))) return true;
      else return false;
    }
    if(Nagib(t1, t3) == Nagib(t2, t4))
    {
      if(Math.Sqrt(Math.Pow(t1.x-t3.x, 2)+Math.Pow(t1.y-t3.y, 2)) == 2*Math.Sqrt(Math.Pow(t2.x-t4.x, 2)+Math.Pow(t2.y-t4.y, 2)) || Math.Sqrt(Math.Pow(t2.x-t4.x, 2)+Math.Pow(t2.y-t4.y, 2)) == 2*Math.Sqrt(Math.Pow(t1.x-t3.x, 2)+Math.Pow(t1.y-t3.y, 2))) return true;
      else return false;
    }
    if(Nagib(t2, t3) == Nagib(t1, t4))
    {
      if(Math.Sqrt(Math.Pow(t2.x-t3.x, 2)+Math.Pow(t2.y-t3.y, 2)) == 2*Math.Sqrt(Math.Pow(t1.x-t4.x, 2)+Math.Pow(t1.y-t4.y, 2)) || Math.Sqrt(Math.Pow(t1.x-t4.x, 2)+Math.Pow(t1.y-t4.y, 2)) == 2*Math.Sqrt(Math.Pow(t2.x-t3.x, 2)+Math.Pow(t2.y-t3.y, 2))) return true;
      else return false;
    }
    return false;
  }
  static void Kombinacije(Tacka[] tacke, int j, Tacka[] cetiri, int i, ref int brojac)
  {
    if(j == 4)
    {
      if(Trapez(cetiri[0], cetiri[1], cetiri[2], cetiri[3])) brojac++;
      return;
    }
    if(i >= tacke.Length) return;
    cetiri[j] = tacke[i];
    Kombinacije(tacke, j+1, cetiri, i+1, ref brojac);
    Kombinacije(tacke, j, cetiri, i+1, ref brojac);
  }
  public static void Main (string[] args) {
    int N = int.Parse(Console.ReadLine());
    Tacka[] tacke = new Tacka[N];
    Tacka[] cetiri = new Tacka[4];
    int brojac = 0;
    for(int i = 0;i < N;i++)
    {
      string[] s = Console.ReadLine().Split();
      tacke[i].x = int.Parse(s[0]);
      tacke[i].y = int.Parse(s[1]);
    }
    Kombinacije(tacke, 0, cetiri, 0, ref brojac);
    Console.WriteLine(brojac);
  }
}