10
-2 1
2 -2
-1 -2
0 0
2 -1
0 -2
2 2
0 2
-1 -1
1 -2
 40
-8 24
2 -1
1 -18
72 -70
5 -4
-308 436
-19 40
36 -35
-178 265
-1 2
-7 30
-1 0
3 -2
200 -285
17 -16
-35 74
0 -4
-86 106
-1 4
-7 6
0 1
-5 4
-2 3
6 -5
-4 5
181 -262
76 -118
0 0
-7 18
-58 104
-5 6
-6 12
-3 4
1 0
11 -10
-86 130
-3 6
153 -236
-183 270
-33 64
 5
0 -1
0 -2
0 -3
0 -4
0 -5
 10
0 1
-1 -1
1 1
-1 0
1 -1
-2 -1
-2 2
-2 0
0 -2
0 -1
 20
-1 18
-2 5
-5 4
2 -33
9 -18
0 0
11 -22
2 0
-1 2
-4 41
1 6
1 -2
6 -12
0 1
-3 6
3 -6
3 -8
-1 4
2 -5
1 0
 10
2 1
-1 0
-2 -1
-1 1
0 2
2 -2
0 0
-2 -2
0 -2
-2 1
 20
-3 -3
0 4
-3 1
1 1
-1 2
-4 4
3 -1
-3 0
0 2
4 0
2 3
2 4
4 -3
-4 3
-1 1
1 3
-2 4
1 -2
1 -1
3 0
 3
0 0
0 -1
0 1
 10
2 1
-1 1
0 0
-3 1
-2 -3
-1 -2
-1 -1
1 2
3 -2
0 -2
 3
3 3
1 2
1 1
 4
0 0
1 0
2 0
3 0
 9
1 1
1 0
0 1
0 0
-1 0
-1 1
-1 -1
1 -1
0 -1
 7
1 1
-1 -1
1 0
0 1
-1 0
0 -1
0 0

4
 57
 4
 5
 21
 4
 10
 1
 1
 0
 2
 8
 3

import java.io.*;
import java.util.*;
import java.math.*;
import java.awt.image.AreaAveragingScaleFilter;
import static java.lang.Math.*;
import java.lang.*;



public class Main {
    static FastScanner in;
    static PrintWriter out;
    public static void main(String[] args) throws FileNotFoundException {
        runIO(0);

        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    }

    public static void runIO(int R) throws FileNotFoundException{
        if (R==1){
            in = new FastScanner(new File("input.txt"));
            out = new PrintWriter(new File("output.txt"));
        } else
        {
            in = new FastScanner(System.in);
            out = new PrintWriter(System.out);
        }
    }
}


class Task {
    final int N = 5000;
    int n;
    Pair aa[] = new Pair[N];


    Map<Pair, Integer> mp = new LinkedHashMap<Pair, Integer>();
    void inc(Map<Pair, Integer> mp, Pair x, int val){
        int a = val;
        if (mp.containsKey(x)) {
            a+= (int)mp.get(x);

        }
        mp.remove(x);
        mp.put(x, a);
    }


    public void solve(int testNumber, FastScanner in, PrintWriter out) {
        n = in.nextInt();
        for (int i=0; i<n; i++){
            Pair a = new Pair();
            a.first = in.nextInt();
            a.second = in.nextInt();
            aa[i]=a;
            inc(mp, a, 1);
        }
        int ans=0;
        for (int i=0; i<n; i++)
            for (int j=0; j<n; j++){
                if (i==j) continue;
                if ((aa[i].first+aa[j].first+1000000)%2>0) continue;
                if ((aa[i].second+aa[j].second+1000000)%2>0) continue;

                Pair x = new Pair((aa[i].first+aa[j].first)/2, (aa[i].second+aa[j].second)/2);
                //if (mp.containsKey(x)) ans++;
                if (mp.containsKey(x))ans+=(int)mp.get(x);
            }
        out.println(ans/2);
    }

}

class Pair implements Comparable<Pair>{
    public int first, second;
    Pair(){
        first=second=-1;
    }
    Pair(int a, int b){
        first = a; second=b;
    }
    @Override
    public int compareTo(Pair b){
        if (first<b.first) return 1; else
        if (first>b.first) return -1; else
        if (second<b.second)  return 1; else return -1;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        char c = (char)42;
        result = (int)(1L*first*second + first + second);
        if (second!=0) result+=first % second;
        if (first!=0) result+=second%first;
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        Pair b = (Pair)obj;
        if (first==b.first && second==b.second) return true;
        return false;
    }

}

class PairComparator implements Comparator<Pair>{

    public int compare(Pair a, Pair b) {
        if (a.first<b.first) return 1; else
        if (a.first>b.first) return -1; else
        if (a.second<b.second)  return 1; else return -1;
    }
}


class Trie{
    final int N = 700100;
    class TrieNode{
        public int to[] = new int[26];
        public int ends;
        public boolean leaf;
        public int add;
        public TrieNode(){
            for (int i=0; i<26; i++) to[i]=-1;
            ends=0;
            leaf=false;
            add=0;
        }
    }


    TrieNode t[] = new TrieNode[N];
    int size=1;
    int v;

    public Trie(int Size){
        for (int i=0; i<=Size; i++) t[i] = new TrieNode();

    }

    public void Reset(){
        v=0;
    }

    public void AddString(String s, int val){
        for (int i=0; i<s.length(); i++){
            int c = s.charAt(i)-'a';
            if (t[v].to[c]==-1){
                size++;
                t[v].to[c] = size;
            }
            v = t[v].to[c];
        }
        t[v].leaf = true;
        t[v].add+=val;
        t[v].ends++;
    }

    public void AddChar(int c, int val){
        if (t[v].to[c]==-1){
            size++;
            t[v].to[c] = size;
        }
        v = t[v].to[c];
        t[v].leaf = true;
        t[v].add+=val;
        t[v].ends++;
    }

    public int Common(String s){
        int v=0;
        for (int i=0; i<s.length(); i++){
            int c = s.charAt(i)-'a';
            if (t[v].to[c]==-1) return 0;
            v = t[v].to[c];
        }
        if (t[v].add!=3) return -1000;
        return t[v].ends;
    }

}

class Graph{
    final int N = 100010;
    List<Integer>[] g = new ArrayList[N];
    int tin[] = new int[N];
    int tout[] = new int[N];
    int size[] = new int[N];
    int up[][] = new int[N][20];
    int partial_sum[] = new int[N];
    int level[] = new int[N];
    int timer, L;

    public Graph(int CountOfVertexes){
        timer=0;
        L=1;
        while ((1 << L)<=CountOfVertexes) L++;

        for (int i=1; i<=CountOfVertexes; i++) g[i] = new ArrayList<Integer>();
    }

    public void AddOrientalEdge(int a, int b){
        g[a].add(b);
    }

    public void AddUnorientalEdge(int a, int b){
        g[a].add(b);
        g[b].add(a);
    }

    public void Dfs(int v, int p, int down){
        tin[v] = ++timer;
        up[v][0]=p;
        for (int i=1; i<=L; i++) up[v][i] = up[up[v][i-1]][i-1];

        size[v]=1;
        level[v]=down;
        for (int i=0; i<g[v].size(); i++)
        {
            int to = g[v].get(i);
            if (to==p) continue;
            Dfs(to, v, down+1);
            size[v]+=size[to];
        }
        tout[v]=++timer;
    }

    public boolean Upper(int a, int b){
        return (tin[a]<=tin[b] && tout[a]>=tout[b]);
    }

    public int LCA(int a, int b){
        if (Upper(a, b)) return a;
        if (Upper(b, a)) return b;
        for (int i=L; i>=0; i--)
            if (!Upper(up[a][i], b)) a = up[a][i];
        return up[a][0];
    }

    public int GetDist(int a, int b){
        if (level[a]>level[b]){
            int temp = b;
            b = a;
            a = temp;
        }
        int lca = LCA(a, b);
        if (lca==a) return level[b]-level[a]; else
            return level[b]+level[a] - 2*level[lca];
    }

    public void Preprocessing(){
        Dfs(1, 1, 1);
    }

}

class FastScanner {
    BufferedReader br;
    StringTokenizer st;

    public FastScanner(File f) {
        try {
            br = new BufferedReader(new FileReader(f));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }

    public FastScanner(InputStream f) {
        br = new BufferedReader(new InputStreamReader(f));
    }

    String next() {
        while (st == null || !st.hasMoreTokens()) {
            String s = null;
            try {
                s = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (s == null)
                return null;
            st = new StringTokenizer(s);
        }
        return st.nextToken();
    }

    boolean hasMoreTokens() {
        while (st == null || !st.hasMoreTokens()) {
            String s = null;
            try {
                s = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (s == null)
                return false;
            st = new StringTokenizer(s);
        }
        return true;
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }
}