#include <iostream>
#include <vector>
#include <utility>

using namespace std;// sabiranje vektora



int main()
{
    int n,xi,yi,ima;
    cin >> n;
    vector<pair <int,int> > kordinate(n);
    vector<pair<int,int> > eh;
    for(int i=0;i<n;i++){
        cin >> kordinate[i].first >> kordinate[i].second;
    }
    ima=0;
    for(int i=0;i<n;i++){
        for(int j=i+1;j<n;j++){
            for(int i2=0;i2<n;i2++){
                for(int j2=i2+1;j2<n;j2++){
                    if(2*(kordinate[i].first-kordinate[j].first)==kordinate[i2].first-kordinate[j2].first && (kordinate[i].second-kordinate[j].second)*2==kordinate[i2].second-kordinate[j2].second){
                        ima++;
                    }
                    else if(2*(kordinate[i].first-kordinate[j].first)==kordinate[j2].first-kordinate[i2].first && 2*(kordinate[i].second-kordinate[j].second)==kordinate[j2].second-kordinate[i2].second){
                        ima++;
                    }
                }
            }
        }
    }
    cout << ima << endl;
    return 0;
}