Avoids reporting duplicate pairs.