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

#pragma comment(linker, "/STACK:16777216")
#pragma warning(disable:4786)

#include <set>
#include <map>
#include <list>
#include <cmath>
#include <stack>
#include <queue>
#include <deque>
#include <ctime>
#include <bitset>
#include <vector>
#include <cstdio>
#include <cctype>
#include <string>
#include <utility>
#include <cstring>
#include <cstdlib>
#include <cstring>
#include <sstream>
#include <iomanip>
#include <fstream>
#include <numeric>
#include <iterator>
#include <iostream>
#include <algorithm>
#include <functional>

using namespace std;

#define MAX_SIZE 100100
#define MAX_LENGTH 100100
#define INF ( 1 << 29 );

#define CLR( a ) memset( a , NULL , sizeof( a ) )
#define MEM( a ) memset( a , -1 , sizeof( a ) )
#define fort( a , b ) for( ind = ( a ); ind <= ( b ); ind++ )
#define foriab( a , b ) for( i = ( a ); i < ( b ); i++ )
#define fori( a ) for( i = 0; i < ( a ); i++ )
#define forj( a ) for( j = 0; j < ( a ); j++ )
#define print1( a ) printf( "%d ---\n" , ( a ) )
#define print2( a , b ) printf( "%d %d ---\n" , ( a ) , ( b ) )

typedef __int64 lll ;

int MIN( int a , int b ) { return a < b ? a : b ; }
int MAX( int a , int b ) { return a > b ? a : b ; }
int GCD( int a , int b ) { while( b ) b ^= a ^= b ^= a %= b ; return a ; }
int LCM( int a , int b ) { return a * ( b / GCD( a , b ) ) ; }
void SWAP( int &a , int &b ) { a = a ^ b ; b = a ^ b ; a = a ^ b ; }

const double PI = acos( -1 ) ;
const double EPS = 1e-8 ;

struct st {
    int x , y ;
    bool operator () ( const st &a , const st &b ) {
        if( a.x == b.x ) {
            return a.y < b.y ;
        }
        return a.x < b.x ;
    }
} arr[ MAX_LENGTH ] , cmp ;

int main() {
    //freopen( "B.in" , "r" , stdin ) ;
	//freopen( "out.txt" , "w" , stdout ) ;
	int T , res , n , i , ind ;
	while( scanf( "%d" , &n ) != EOF ) {
        CLR( arr ) ;
        map< pair< int , int > , int > M ;
        pair< int , int > P ;
        int m_cnt = 1 ;
        fori( n ) {
            scanf( "%d%d" , &arr[ i ].x , &arr[ i ].y ) ;
            arr[ i ].x += 2000 ;
            arr[ i ].y += 2000 ;
            P.first = arr[ i ].x ;
            P.second = arr[ i ].y ;
            if( M.find( P ) == M.end() ) {
                M[ P ] = m_cnt ;
                m_cnt++ ;
            }
        }
        sort( arr , arr + n , cmp ) ;
        int j ;
        res = 0 ;
        fori( n ) {
            for( j = i + 1 ; j < n ; j++ ) {
                double a , b ;
                a = ( double )( arr[ i ].x * 1.0 + arr[ j ].x * 1.0 ) * 1.0 / 2.0 ;
                b = ( double )( arr[ i ].y * 1.0 + arr[ j ].y * 1.0 ) * 1.0 / 2.0 ;
                a += EPS ;
                b += EPS ;
                int c , d , e , f ;
                c = ( int ) a ;
                d = ( int ) b ;
                e = ( arr[ i ].x + arr[ j ].x ) / 2 ;
                f = ( arr[ i ].y + arr[ j ].y ) / 2 ;
                P.first = c ;
                P.second = d ;
                if( M.find( P ) == M.end() ) { }
                else {
                    if( c != arr[ i ].x && c != arr[ j ].x && d != arr[ i ].y && d != arr[ j ].y ) {
                        if( c == e && d == f && 2 * e == ( arr[ i ].x + arr[ j ].x ) && 2 * f == ( arr[ i ].y + arr[ j ].y ) ) {
                            res++ ;
                        }
                    }
                }
            }
        }
		printf( "%d\n" , res ) ;
	}
	return 0 ;
}
