keep pairwise constraints only