/* Задача "Обмен пакетами"
 * Интернет олимпиады для школьников. Сезон 2006 - 2007
 * Автор задачи:  Александр Торопов, toropov@rain.ifmo.ru
 * Автор решения: Александр Торопов, toropov@rain.ifmo.ru
 */

import java.io.*;
import java.util.*;

public class ping_at implements Runnable {
	Scanner in;
	PrintWriter out;
	final static int Inf = 100000000;
	
	public void run() {
		String temp = in.nextLine();
		String name = temp.substring(5);
		int received = 0;
		int sum = 0;
		int max = -Inf;
		int min = Inf;
		for(int i = 0; i < 4; ++i) {
			temp = in.nextLine();
			if (temp.equals("Time out"))
				continue;
			++received;
			String str_time = temp.substring(temp.indexOf('=') + 1, temp.length());
			int time = Integer.parseInt(str_time);
			max = java.lang.Math.max(max, time);
			min = java.lang.Math.min(min, time);
			sum += time;
		}
		out.println("Ping statistics for " + name + ":");
		out.println(" Packets: Sent = 4 Received = " + received + " Lost = " + (4 - received) + 
				" (" + ((4 - received) * 25) + "% loss)");
		if (received != 0) {
			out.println("Approximate round trip times:");
			out.println(" Minimum = " + min +" Maximum = " + max + " Average = " + 
				(int)((double)(sum) / (double)(received)  + 0.5) );
		}
		out.close();
	}
	
	private ping_at(String name) {
		try {
			in = new Scanner(new File(name + ".in"));
			out = new PrintWriter(new File(name + ".out"));
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(101);
		}
	}

	public static void main(String[] args) {
		(new Thread(new ping_at("ping"))).start();
	}

}
