We know, distance between two 2D co-ordinate is sqrt( (x1 - x2) ^2 + (y1 - y2)^2 ). As Boltu takes square of it, we don't have to calculate the sqrt. Instead just calculate the value of ( (x1 - x2) ^2 + (y1 - y2)^2 ). Now, to find the two distant circles, we can run a nested loop to check all the combination and keep track of the maximum. A vector of pair can be used to trace all the co-ordinates. That's it! :)