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

public class ping_mb {
    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new FileReader("ping.in"));

        String ip = in.readLine().substring(5);

        int min = Integer.MAX_VALUE, max = 0, av = 0;
        int lost = 0;

        for (int i = 0; i < 4; i++) {
            String ln = in.readLine();
            int index = ln.indexOf('=');
            if (index == -1) {
                lost++;
            } else {
                int time = Integer.parseInt(ln.substring(index + 1)); 
                min = Math.min(min, time);
                max = Math.max(max, time);
                av += time;
            }
        }
        in.close();

        PrintWriter out = new PrintWriter("ping.out");
        out.println("Ping statistics for " + ip + ":");
        out.printf(" Packets: Sent = 4 Received = %d Lost = %d (%d%% loss)\n", (4 - lost), lost, 100 * lost / 4);
        if (lost < 4) {
            out.println("Approximate round trip times:");
            out.printf(" Minimum = %d Maximum = %d Average = %d\n", min, max, (int) (Math.round(av / (4.0 - lost))));
        }

        out.close();
    }
}