solved Pairs from HackerRank