Pairwise-Clustering via Class-Prior Matching