Pairwise Majority Voting Algorithm