Pregunta de entrevista de General Motors (GM)

Distance between some points. Parsing standard input