Pair ssequence problem