#include <stdio.h>

int main() 
{
    double time, voltage;
    int count = 0;

    int rising = 0;
    double max_v = 0.0, max_t = 0.0;

    printf("回数\t時間[s]\t電圧[V]\n");

    while (scanf("%lf,%lf", &time, &voltage) == 2)
    {
        if (voltage > 3.5)
        {
            // 上昇 or 山の途中
            if (!rising) {
                rising = 1;
                max_v = voltage;
                max_t = time;
            }

            // 最大値更新
            if (voltage > max_v) {
                max_v = voltage;
                max_t = time;
            }
        }
        else
        {
            // 山が終わった
            if (rising)
            {
                count++;
                printf("%d\t%.2f\t%.2f\n", count, max_t, max_v);
                rising = 0;
            }
        }
    }

    return 0;
}