import math
day = int(input())
food = float(input())
cat_food = 0
dog_food = 0
biscuits = 0
total_food = 0
total_day = 0
#Всеки 3 ти ден + бисквитка/храна за деня 10%
# Вашата програма трябва да отпечатва статистика за количеството бисквитки, които са изяли, колко процента
# от първоначалното количество обща храна са изяли и колко процента от изядената храна е изяло кучето и
# колко е изяла котката.
for i in range(day):
dog = int(input())
cat = int(input())
total_day += 1
cat_food += cat
dog_food += dog
total_food += cat + dog
if total_day == 3:
biscuits = (cat + dog) * 0.1
total_day = 0
print(f'Total eaten biscuits: {math.ceil(biscuits)}gr.')
print(f'{abs(total_food / food) * 100:.2f}% of the food has been eaten.')
print(f'{(dog_food / total_food ) * 100:.2f}% eaten from the dog.')
print(f'{(cat_food / total_food) * 100:.2f}% eaten from the cat.')
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}