Find the intersections

Problem Name:
Find the intersections
Site:HackerEarth
Links:
Tags:
Problem setters: