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

public class ReadPayroll {
  /* reads a string of this form:
     123 Kim 12.5 8.1 7.6 3.2

     returns a string of this form:
     Kim (ID#123) worked 31.4 hours (7.85 hours/day)
  */
  public static String procOneEmployee(String line) {
    Scanner in = new Scanner(line);
    
    int ID = in.nextInt();
    String name = in.next();
    double sumHours = 0;
    int numDays = 0;

    while (in.hasNextDouble()) {
      sumHours += in.nextDouble();
      numDays++;
    }
    return name + " (ID#" + ID + ") worked " +
        sumHours + " hours + (" + (sumHours / numDays) + " hours / day)";
  }
  
  public static void main(String []args)
      throws FileNotFoundException {
    Scanner inFromFile = new Scanner(new File("hours.txt"));
    while (inFromFile.hasNextLine()) {
      String line = inFromFile.nextLine();
      // System.out.println("DEBUG. Just read: " + line);
      System.out.println(procOneEmployee(line));
    }
  }
}
