one_test = []
two_test = []
four_test= []

text = "~"
while (text != ""):
    text = input("4-test: ")
    if text:
       four_test.append(float(text))

text = "~"

while (text != ""):
    text = input("2-test: ")
    if text:
        two_test.append(float(text))

text = "~"

while (text != ""):
    text = input("1-test: ")
    if text:
        one_test.append(float(text))

total = [4*i for i in four_test] + [2*i for i in two_test] + one_test
average = sum(total) / (len(four_test)*4 + len(two_test)*2 + len(one_test))

print(total)
print(average)
