Emergence of social cluster by collective pairwise encounters in Drosophila