#include <stdio.h>

#define MAX_DATA 20000

int main(void) {
	double time[MAX_DATA];
	double voltage[MAX_DATA];
	int count = 0;
	
	while(scanf ("%lf,%lf", &time[count], &voltage[count]) == 2){
		count++;
		
		if(count >= MAX_DATA){
			printf("警告：データ数が配列の最大値を超えました。\n");
			break;
		}
	}
	printf("--- ピーク検出結果 ---\n");
	printf("波形番号\t時刻[秒]\t電位[V]\n");
	
	int peak_count = 1;
	double threshold = 3.5;
	
	for(int i = 1; i<count - 1; i++){
		if(voltage[i] > voltage[i-1] && voltage[i] > voltage[i+1] && voltage[i] > threshold){
			printf("%d\t\t%.2f\t\t%.2f\n", peak_count, time[i], voltage[i]);
			peak_count++;
		}
		if(peak_count == 1){
			printf("指定された閾値(%.2fV)を超えるピークは見つかりませんでした。\n", threshold);
		}
	}
	return 0;
}
