I have to find shortest path and chose BFS, but nodes are described in x,y coordinates. Input data:
3 9
1 6
2 3 8
2 5 7
First two numbers