Check path between vertices.