MST/dijkstra works for 2 point