跳到主要内容
图灵 OJTURING / ONLINE JUDGE

#F1270. Number of Parallelograms

    ID: 1276 传统题 2000ms 256MiB 尝试: 0 已通过: 0 难度: 6 上传者: 标签>计算几何数学提高难度共享题库Codeforces英文题面题目来源题面语言

Number of Parallelograms

题目描述

D. Number of Parallelograms
time limit per test
4 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

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


题目来源:fps-www.educg.net-codeforce-1-2833.xml.zip;FPS 共享题包,题包内第 755 题。保留原作者与原赛事署名。