I have a set of m convex polygons $(p_1,p_2, \ldots p_m)$. $n_i$ is the number of vertices in $p_i$. $\sum_{i=1}^{m} n_i = n$. Each polygon has vertices listed in anti-clockwise direction, starting with the left most vertex (smallest x coordinate) in $p_i$. I have to present an $O(n \log m)$ algorithm that determines whether any two convex polygons of the set intersect.
How can I make the algorithm $n\log m$? As far as I know,two convex polygons $P_i$ and $P_j$ are said to intersect if they contain any point in common (that is, either their boundaries intersect or one polygon is contained within the other). Please help me.