Input: list of lists of two integers
List<List<int>> lists = new List<List<int>>() {
  {1,2},
  {20,21},
  {3,2},
  {21,55}
};
output: list of lists of two integers which have the same first OR second integer value
{
  {{1,2}, {3,2}}, 
  {{20,21}, {21,55}}
}
 
    