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
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Objects;
import java.util.Random;
import java.util.StringTokenizer;

public class Solution{

	
	
    public static void main(String[] args) throws IOException {
     
    	FastScanner fs = new FastScanner();
    	PrintWriter out = new PrintWriter(System.out);
    	
    	
    		
    	int tt = 1;
    	while(tt-->0) {
    		
    		int n = fs.nextInt();
    		Pair[] p = new Pair[n];
    		for(int i=0;i<n;i++) {
    			p[i] = new Pair(fs.nextInt(), fs.nextInt());
    		}
    		
    		Arrays.sort(p);
    		
    		Pair[] arr = new Pair[4000005];
    		int cur = 0;
    		for(int i=0;i<n;i++) {
    			for(int j=i+1;j<n;j++) {
    				arr[cur++] = new Pair(p[i].x-p[j].x, p[i].y-p[j].y);
    			}
    		}
    		
    		Arrays.sort(arr, 0, cur);
    		
    		int ans = 0;
    		
    		int c = 1;
    		for(int i=1;i<cur;i++) {
    			if(arr[i].x==arr[i-1].x && arr[i].y==arr[i-1].y) c++;
    			else {
    				ans +=c*(c-1)/2; c = 1;
    			}
    		}
    		
    		ans += c*(c-1)/2;
    		ans /= 2;
    		out.println(ans);
    		
    		
    		
    		
    		
    		
    	}
    	
    		
    		
    		
    	out.close();
    		
    }
    
    
   
    static class Pair implements Comparable<Pair>{
    	int x, y;
    	
    	Pair(int x, int y){
    		this.x = x; this.y = y;
    	}
    	
    	public int compareTo(Pair p) {
    		if(this.x==p.x) return this.y-p.y;
    		return this.x-p.x;
    	}
    	
    }
    
    
    
    
    
    static final Random random=new Random();
    	
    static void ruffleSort(int[] a) {
    	int n=a.length;//shuffle, then sort 
    	for (int i=0; i<n; i++) {
    		int oi=random.nextInt(n); int temp=a[oi];
    		a[oi]=a[i]; a[i]=temp;
    	}
    	Arrays.sort(a);
    }
   
  
    
    	
    	
    static class FastScanner{
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	StringTokenizer st = new StringTokenizer("");
     
    	public String next(){
    		while(!st.hasMoreElements()){
    			try{
    				st = new StringTokenizer(br.readLine());
    			} catch(IOException e){
    				e.printStackTrace();
    			}
    		}
    		return st.nextToken();
    	}
    		
    	public String nextLine() throws IOException {
    		return br.readLine();
    	}
    		
    	public int nextInt(){
    		return Integer.parseInt(next());
    	}
     
    	public int[] readArray(int n){
    		int[] a = new int[n];
    		for(int i=0;i<n;i++)
    			a[i] = nextInt();
    		return a;
    	}
    		
    	public long nextLong() {
    		return Long.parseLong(next());
    	}
    		
    	public char nextChar() {
    		return next().toCharArray()[0];
    	}
    }
   	
}
