The heart flu

It has been discovered that a new disease is attacking human beings. This new disease consists in a virus that attacks the heart, causing malfunction of it, leading to a permanent brain damage —in the best case scenario— or death. Since a collective paranoia has been raised, all hospitals have exceeded their capacity to check every patient that comes into the ER. One of the new guidelines proposed by the hospital director was to create a triage, based on a computer program because there are no doctors enough to review all ECGs. The proposal is to admit a patient into the ER, take him/her to the ECG room were the patient lecture will be taken. The computer will take some specific points of the ECG and determine if the patient should be reviewed carefully by a doctor or if the patient is healthy and a psychiatrist needs to talk to him and explain the effects of the paranoia in his/her feelings. You have been assigned to create the program that will take the lecture points in the ECG. The important complex in an ECG is called QRS complex. • Q is the first wave in the complex with negative value • R is the second wave in the complex with positive value, and in a classic ECG, is the biggest wave • S is the last wave in the complex with negative value that comes after R wave. In a normal ECG, the QRS complex has duration between 60 and 100 milliseconds, and a voltage no greater than 35 mV, and has no valleys. Input The input consists in the name of the patient, followed by an , age an * and the points of lecture in the ECG separated by commas. Each point of data is 10 ms apart from each other. The point is given in mV. Output Each patient data will be separated by a ‘---’ line. The name of the patient Age Triage [PASS | NO PASS] Sample Input Gambino, Christine350,0.1,-0.35,1.3,-0.55,0,.05,0 Martim, Gustavo290,0.1,-0.5,1.5,-1,0,0.075,0 Guzman, Isabel15*0,0,-0.05,-0.1,0.1,0.25,0.5,0.7,0.4,0.2,-0.01,-0.25,-0.5,-0.25 Sample Output Gambino, Christine 35 Triage PASS

2/2 Martim, Gustavo 29 Triage PASS

Guzman, Isabel 15 Triage NO PASS