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
#!/usr/bin/python

import os
import sys
import itertools
import collections

def solve(f):
    n = f.read_int()
    s = set()
    for _ in xrange(n):
        s.add(tuple(f.read_int_list()))

    diff = collections.defaultdict(int)
    for p1, p2 in itertools.combinations(s, 2):
        if p1[0] > p2[0]:
            diff[(p1[0]-p2[0], p1[1]-p2[1])] += 1
        elif p1[0] < p2[0]:
            diff[(p2[0]-p1[0], p2[1]-p1[1])] += 1
        else:
            diff[(0, abs(p1[1]-p2[1]))] += 1

    ans = 0
    for i in diff.values():
        ans += i*(i-1)/2

    # for p1, p2, p3 in itertools.combinations(s, 3):
    #     if (p2[0]+p3[0]-p1[0], p2[1]+p3[1]-p1[1]) in s: ans += 1
    #     if (p1[0]+p3[0]-p2[0], p1[1]+p3[1]-p2[1]) in s: ans += 1
    #     if (p1[0]+p2[0]-p3[0], p1[1]+p2[1]-p3[1]) in s: ans += 1

    return ans/2

class Reader(object):
    def __init__(self, filename=None):
        self.test_mode = filename is not None
        self.cases = 1
        self.buffer = []
        if self.test_mode:
            with open(filename) as f:
                blank_flg = False
                for line in f:
                    line = line.strip()
                    if line:
                        self.buffer.append(line)
                        blank_flg = False
                    else:
                        if not blank_flg: self.cases += 1
                        blank_flg = True

    def __readline(self):
        return self.buffer.pop(0) if self.test_mode else raw_input()

    def read_int(self):
        return int(self.__readline())
    def read_float(self):
        return float(self.__readline())
    def read_long(self):
        return long(self.__readline())
    def read_str(self):
        return self.__readline()

    def read_int_list(self):
        return [int(item) for item in self.__readline().split()]
    def read_float_list(self):
        return [float(item) for item in self.__readline().split()]
    def read_long_list(self):
        return [long(item) for item in self.__readline().split()]
    def read_str_list(self):
        return self.__readline().split()

if __name__ == '__main__':
    filename = sys.argv[1] if len(sys.argv)>1 else None
    f = Reader(filename)
    if f.test_mode:
        for c in xrange(f.cases):
            print "Case #%d"%(c+1)
            print solve(f)
    else:
        print solve(f)
