c = [1.1,0.6,0.2,0.0]

r = [0 for i in range(8)]

while 1:

    try:

        e = list(map(float, input().split()))

        for i in range(2):

            for j in range(4):

                if e[i] >= c[j]:

                	r[i+2*j] += 1

                	break

    except:

        break

for i in range(0,8,2):

	print(r[i],r[i+1])
from bisect import bisect

ref = [0.2,0.6,1.1]

l,r = [0]*4,[0]*4

while 1:

    try:

        le,re = list(map(float, input().split()))

        l[bisect(ref,le)] += 1

        r[bisect(ref,re)] += 1

    except:

        break

for i in range(1,5):

	print(l[-i],r[-i])
c = [1.1, 0.6, 0.2, 0.0]
r = [0 for i in range(8)]
while 1:
    try:
        e = list(map(float, input().split()))
        for i in range(2):
            for j in range(4):
                if e[i] >= c[j]:
                    r[i + 2 * j] += 1
                    break
    except:
        break
for i in range(0, 8, 2):
    print(r[i], r[i + 1])

from bisect import bisect

ref = [0.2, 0.6, 1.1]
l, r = [0] * 4, [0] * 4
while 1:
    try:
        le, re = list(map(float, input().split()))
        l[bisect(ref, le)] += 1
        r[bisect(ref, re)] += 1
    except:
        break
for i in range(1, 5):
    print(l[-i], r[-i])

-c = [1.1, 0.6, 0.2, 0.0] -r = [0 for i in range(8)] +from bisect import bisect + +ref = [0.2, 0.6, 1.1] +l, r = [0] * 4, [0] * 4 -        e = list(map(float, input().split())) -        for i in range(2): -            for j in range(4): -                if e[i] >= c[j]: -                    r[i + 2 * j] += 1 -                    break +        le, re = list(map(float, input().split())) +        l[bisect(ref, le)] += 1 +        r[bisect(ref, re)] += 1 -for i in range(0, 8, 2): -    print(r[i], r[i + 1]) +for i in range(1, 5): +    print(l[-i], r[-i])