import java.util.Scanner;
public class Main {
public static void main
(String[] args
) { Scanner scanner
= new Scanner
(System.
in); scanner.nextDouble();
scanner.nextDouble();
double length = 0;
while(scanner.hasNextDouble()) {
double startX = scanner.nextDouble();
double startY = scanner.nextDouble();
double finishX = scanner.nextDouble();
double finishY = scanner.nextDouble();
length
+= Math.
sqrt((finishX
- startX
) * (finishX
- startX
) + (finishY
- startY
) * (finishY
- startY
)); }
long minutes
= Math.
round(3 * length
/ 500); System.
out.
print(minutes
/ 60 + ":" + minutes
% 60); }
}
aW1wb3J0IGphdmEudXRpbC5TY2FubmVyOwoKcHVibGljIGNsYXNzIE1haW4gewogICAgcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nW10gYXJncykgewogICAgICAgIFNjYW5uZXIgc2Nhbm5lciA9IG5ldyBTY2FubmVyKFN5c3RlbS5pbik7CiAgICAgICAgc2Nhbm5lci5uZXh0RG91YmxlKCk7CiAgICAgICAgc2Nhbm5lci5uZXh0RG91YmxlKCk7CiAgICAgICAgZG91YmxlIGxlbmd0aCA9IDA7CiAgICAgICAgd2hpbGUoc2Nhbm5lci5oYXNOZXh0RG91YmxlKCkpIHsKICAgICAgICAgICAgZG91YmxlIHN0YXJ0WCA9IHNjYW5uZXIubmV4dERvdWJsZSgpOwogICAgICAgICAgICBkb3VibGUgc3RhcnRZID0gc2Nhbm5lci5uZXh0RG91YmxlKCk7CiAgICAgICAgICAgIGRvdWJsZSBmaW5pc2hYID0gc2Nhbm5lci5uZXh0RG91YmxlKCk7CiAgICAgICAgICAgIGRvdWJsZSBmaW5pc2hZID0gc2Nhbm5lci5uZXh0RG91YmxlKCk7CiAgICAgICAgICAgIGxlbmd0aCArPSBNYXRoLnNxcnQoKGZpbmlzaFggLSBzdGFydFgpICogKGZpbmlzaFggLSBzdGFydFgpICsgKGZpbmlzaFkgLSBzdGFydFkpICogKGZpbmlzaFkgLSBzdGFydFkpKTsKICAgICAgICB9CiAgICAgICAgbG9uZyBtaW51dGVzID0gTWF0aC5yb3VuZCgzICogbGVuZ3RoIC8gNTAwKTsKICAgICAgICBTeXN0ZW0ub3V0LnByaW50KG1pbnV0ZXMgLyA2MCArICI6IiArIG1pbnV0ZXMgJSA2MCk7CiAgICB9Cn0K