from numpy import *
from math import *
a=0
b=0
c=0
d=0
v1=array(eval(input()))
while(sum(v1)>=0):
	a=v1[1]+a
	b=v1[2]+b
	c=v1[3]+c
	d=v1[4]+d
	v1=array(eval(input()))
print("ADM")
print("Entrada:",a)
print("Saida:",b)
print("CHAO")
print("Entrada:",c)
print("Saida:",d)

	