Submit solution

Points:
10 (partial)

Time limit:
1.0s

Memory limit:
128M

Author:

Problem type

Allowed languages

Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, ~~CommonLisp~~, D, Dart, F#, Forth, Fortran, Go, ~~Groovy~~, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, ~~Nim~~, ~~ObjC~~, OCaml, ~~Octave~~, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

James loves rectangles, so he wants to exterminate everyone that dislikes rectangles. In order to convince James that you like rectangles, you are to answer the following question.

Given points on a 2-D coordinate plane, count the number of rectangles that can be formed by using four points as vertices.

#### Input Specification

The first line of input contains integer .

The following lines of input each contain , , representing points on the coordinate plane.

**It's guaranteed that the points are distinct.**

#### Output Specification

Output one integer, the number of rectangles that can be formed with the points given.

**NOTE: rectangles may not be axis-aligned.**

#### Constraints

##### Subtask 1 [20%]

##### Subtask 2 [80%]

No further constraints.

#### Sample Input

```
7
1 1
1 2
2 1
2 2
2 3
3 2
3 3
```

#### Sample Output

`3`

## Comments