General Motors (GM) Interview Question

Distance between some points. Parsing standard input