a=[]
k = 0
m = 0
n = int (input())
for i in range (0 , n):
a.append(int(input()))
for i in range(0,14):
if a[i] % 2 == 0 and a [i] >= 0:
k+=1
m+=a[i]
print(k)
print(m)
a=[]
k = 0
m = 0
n = int (input())
for i in range (0 , n):
a.append(int(input()))
for i in range(0,14):
if a[i] % 2 == 0 and a [i] >= 0:
k+=1
m+=a[i]
print(k)
print(m)