You are given n points on a plane. All the points are distinct and no three of them lie on the same line. Find the number of parallelograms with the vertices at the given points.

Input

The first line of the input contains integer n (1 ≤ n ≤ 2000) — the number of points.

Each of the next n lines contains two integers (xi, yi) (0 ≤ xi, yi ≤ 109) — the coordinates of the i-th point.

Output

Print the only integer c — the number of parallelograms with the vertices at the given points.

Example

Input

4
0 1
1 0
1 1
2 0


Output

1
//package codeforcespracice;

import java.io.*;
import java.util.*;
public class numberofparrelleograms {
	public static void main(String[] args) throws Exception
	{
		InputReader in=new InputReader(System.in);
		PrintWriter pw=new PrintWriter(System.out);
		int n=in.nextInt();
		Point[] arr=new Point[n];
		for(int i=0;i<n;i++)
		{
			arr[i]=new Point(in.nextInt(),in.nextInt());
		}
		HashMap<LongLongPair,Integer> mid=new HashMap<LongLongPair,Integer>();
		for(int i=0;i<n;i++)
		{
			for(int j=i+1;j<n;j++)
			{
				LongLongPair lp=new LongLongPair(arr[i].x+arr[j].x,arr[i].y+arr[j].y);
				if(mid.containsKey(lp))
				{
					int cc=mid.get(lp);
					mid.put(lp, cc+1);
				}
				else
				{
					mid.put(lp, 1);
				}
			}
		}
		long ans=0;
		for(long w:mid.values())
		{
			ans+=(w*(w-1))/2;
		}
		pw.println(ans);

		
		pw.close();
	}
	public static long gcd(long a,long b)
	{
		while(a>0 && b>0)
		{
			if(a>b)
			{
				a%=b;
			}
			else
			{
				b%=a;
			}
			
		}
		return a+b;

	}
	static class Point
	{
		int x, y;
		Point(int x,int y)
		{
			this.x=x;
			this.y=y;
		}
	}
	static  class LongLongPair implements Comparable<LongLongPair> {
		    public final long first;
		    public final long second;

		    public LongLongPair(long first, long second) {
		        this.first = first;
		        this.second = second;
		    }


		    public boolean equals(Object o) {
		        if (this == o) {
		            return true;
		        }
		        if (o == null || getClass() != o.getClass()) {
		            return false;
		        }

		        LongLongPair pair = (LongLongPair) o;

		        return first == pair.first && second == pair.second;
		    }


		    public int hashCode() {
		        int result = Long.hashCode(first);
		        result = 31 * result + Long.hashCode(second);
		        return result;
		    }


		    public String toString() {
		        return "(" + first + "," + second + ")";
		    }

		    @SuppressWarnings({"unchecked"})
		    public int compareTo(LongLongPair o) {
		        int value = Long.compare(first, o.first);
		        if (value != 0) {
		            return value;
		        }
		        return Long.compare(second, o.second);
		    }

		}
	
	
	
	
	
	
	
	
	 static class InputReader {

		private InputStream stream;
		private byte[] buf = new byte[8192];
		private int curChar;
		private int snumChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int snext() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}

			int res = 0;

			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));

			return res * sgn;
		}
		
		public long nextLong() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}

			long res = 0;

			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));

			return res * sgn;
		}
		
		public String readString() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}

}

