A certain physics teacher is marking tests. She has a specific marking scheme: if the paper has a drawing of a tree on it (the official Massey Green logo), the section of TACK worth the most automatically gets perfect. On the contrary, those who do not support Massey Green automatically get 0 on the section worth the most.
Given the person's Massey Green Status, their marks in each section and the total available marks in each section, output the person's weighted average for that test. The first line contains their Massey Green status ("trees!" or "no"), and the next 4 lines containing the person's score, the maximum score, and the weighting ~w~ ~(0 \le w \le 1)~ separated by a space.
Output the person's result as a percentage rounded to the nearest integer.
trees! 10 20 0.6 15 20 0.2 12 15 0.1 19 20 0.1