Code for Pairs.