10
-2 1
2 -2
-1 -2
0 0
2 -1
0 -2
2 2
0 2
-1 -1
1 -2
 40
-8 24
2 -1
1 -18
72 -70
5 -4
-308 436
-19 40
36 -35
-178 265
-1 2
-7 30
-1 0
3 -2
200 -285
17 -16
-35 74
0 -4
-86 106
-1 4
-7 6
0 1
-5 4
-2 3
6 -5
-4 5
181 -262
76 -118
0 0
-7 18
-58 104
-5 6
-6 12
-3 4
1 0
11 -10
-86 130
-3 6
153 -236
-183 270
-33 64
 5
0 -1
0 -2
0 -3
0 -4
0 -5
 10
0 1
-1 -1
1 1
-1 0
1 -1
-2 -1
-2 2
-2 0
0 -2
0 -1
 20
-1 18
-2 5
-5 4
2 -33
9 -18
0 0
11 -22
2 0
-1 2
-4 41
1 6
1 -2
6 -12
0 1
-3 6
3 -6
3 -8
-1 4
2 -5
1 0
 10
2 1
-1 0
-2 -1
-1 1
0 2
2 -2
0 0
-2 -2
0 -2
-2 1
 20
-3 -3
0 4
-3 1
1 1
-1 2
-4 4
3 -1
-3 0
0 2
4 0
2 3
2 4
4 -3
-4 3
-1 1
1 3
-2 4
1 -2
1 -1
3 0
 3
0 0
0 -1
0 1
 10
2 1
-1 1
0 0
-3 1
-2 -3
-1 -2
-1 -1
1 2
3 -2
0 -2
 3
3 3
1 2
1 1
 4
0 0
1 0
2 0
3 0
 9
1 1
1 0
0 1
0 0
-1 0
-1 1
-1 -1
1 -1
0 -1
 7
1 1
-1 -1
1 0
0 1
-1 0
0 -1
0 0

4
 57
 4
 5
 21
 4
 10
 1
 1
 0
 2
 8
 3

import java.util.*;
import java.lang.*;
public class B181
	{
	public static void main(String[] args)
		{
		Scanner in =new Scanner(System.in);
		int n = in.nextInt();
		int i=0,count=0,x=0,y=0,c=0,d=0,j=0;
		Data[] a = new Data[n];
		for(i=0;i<n;i++)
			{
			a[i]=new Data(in.nextInt(),in.nextInt());
			}
		a=MergeSort(a,0,n-1);
		for(i=0;i<n-2;i++)
			{
			for(j=2;j<n;j++)
				{
				c=a[i].getValue()+a[j].getValue();
				d=a[i].getIndex()+a[j].getIndex(); 
				x=(c)/2;
				y=(d)/2;
				if(c%2==0&&d%2==0&&check(a,i,j,x,y))
					{
					count++;
					}
				}
			}
		System.out.println(count);
		}
	public static boolean check(Data[] a,int m,int n,int x,int y)
		{
		int mid=0,x1=0,y1=0;
		while(m<n)
			{
			mid=(m+n)/2;
			x1=a[mid].getValue();y1=a[mid].getIndex();
			if(x1==x&&y1==y)
				{
				return true;
				}
			else if((x1==x&&y1<y)||(x1<x&&y1==y)||(y1<y&&x1<y))
				{
				m=mid+1;
				}
			else
				{
				n=mid;
				}
			}
		return false;
		}
	public static Data[] MergeSort(Data[] a,int low,int high)
		{
		if(low>=high)
			{
			return a;
			}
		else
			{
			int middle=(high+low)/2;
			Data[] left = new Data [middle-low+1];
			Data[] right = new Data [high-middle];
			int i=0,count=0;
			for(i=0;i<=middle-low;i++)
				{
				left[count]=a[i];count++;
				}
			count=0;
			for(i=middle+1-low;i<=high-low;i++)
				{
				right[count]=a[i];count++;
				}
			Data[] SortedLeft =MergeSort(left,low,middle);
			Data[] SortedRight =MergeSort(right,middle+1,high);
			return Merge(SortedLeft,SortedRight,low,high);
			}
		}
	public static Data[] Merge(Data[] sl,Data[] sr,int low,int high)
		{
		Data fina[]  = new Data[high-low+1];
		int i=0,middle =(high+low)/2;
		int a=0,b=0,alimit=middle-low+1,blimit=high-middle;
		int n=alimit+blimit;
		/*System.out.println("sl");
		for(i=0;i<alimit;i++)
			{
			int x = sl[i].getValue();
			int y = sl[i].getIndex();
			System.out.println(x+" "+y);
			}
		System.out.println("sr");
		for(i=0;i<blimit;i++)
			{
			int x = sr[i].getValue();
			int y = sr[i].getIndex();
			System.out.println(x+" "+y);
			}*/
		for(i=0;i<n;i++)
			{
			if(a!=alimit&&(b==blimit||(sl[a].getValue()<=sr[b].getValue()&&a<alimit)||(sl[a].getValue()==sr[b].getValue()&&sl[a].getIndex()<sr[b].getIndex())))
				{
				fina[i]=new Data(sl[a].getValue(),sl[a].getIndex());
				a++;
				}
			else
				{
				fina[i]=new Data(sr[b].getValue(),sr[b].getIndex());
				b++;
				}
			}
		return fina;
		}
	}
 class Data
	{
	private int val;
	private int index;
	public Data(int x,int y)
		{
		val=x;
		index=y;
		}
	public int getValue()
		{
		return this.val;
		}
	public int getIndex()
		{
		return this.index;
		}
	}