Title: Visual Acuity Test

The task is to create a program that takes input data from a visual acuity test and outputs the number of people falling into each category based on the visual acuity chart below, for both left and right eyes.

Table:
Judgment   Visual Acuity
A          1.1 or higher
B          0.6 or higher, less than 1.1
C          0.2 or higher, less than 0.6
D          Less than 0.2

Input:
The input is given in the following format:
l1 r1
l2 r2
l3 r3
...
Each line i contains two real numbers separated by a space, representing the left and right visual acuity of the i-th person. The visual acuity ranges from 0.1 to 2.0, given in increments of 0.1.

The number of input lines does not exceed 40.

Output:
Output the judgment table in the following format:
Line 1: Number of people with A visual acuity for the left eye, Number of people with A visual acuity for the right eye (separated by a space)
Line 2: Number of people with B visual acuity for the left eye, Number of people with B visual acuity for the right eye (separated by a space)
Line 3: Number of people with C visual acuity for the left eye, Number of people with C visual acuity for the right eye (separated by a space)
Line 4: Number of people with D visual acuity for the left eye, Number of people with D visual acuity for the right eye (separated by a space)

Sample Input:
1.0 1.2
0.8 1.5
1.2 0.7
2.0 2.0

Output for the Sample Input:
2 3
2 1
0 0
0 0

# Buggy version:
ld, rd = [0, 0, 0, 0]. [0, 0, 0, 0]
while True:
    try:
        l, r = map(float, input().split())
        if l < 0.2:
            ld[3] += 1
        elif l < 0.6:
            ld[2] += 1
        elif l < 1.1:
            ld[1] += 1
        else:
            ld[0] += 1

        if r < 0.2:
            rd[3] += 1
        elif r < 0.6:
            rd[2] += 1
        elif r < 1.1:
            rd[1] += 1
        else:
            rd[0] += 1

    except:
        break

for l, r in zip(ld, rd):
    print(l, r)

# Fixed version:
ld, rd = [0, 0, 0, 0], [0, 0, 0, 0]
while True:
    try:
        l, r = map(float, input().split())
        if l < 0.2:
            ld[3] += 1
        elif l < 0.6:
            ld[2] += 1
        elif l < 1.1:
            ld[1] += 1
        else:
            ld[0] += 1

        if r < 0.2:
            rd[3] += 1
        elif r < 0.6:
            rd[2] += 1
        elif r < 1.1:
            rd[1] += 1
        else:
            rd[0] += 1

    except:
        break

for l, r in zip(ld, rd):
    print(l, r)

# Buggy version:
lvl = [1.1, 0.6, 0.2, 0.0] 
rst = [[0]*4 for _ in range(2)]
eyes = []
while True:
    try:
        l,r = map(float,input().strip().split())
        eyes.append([l,r])
    except EOFError:
        break

for e in eyes:
    for lr in range(2):
        for l in range(len(lvl)):
            if e[lr]>=lvl[l]: 
                rst[lr][l] += 1
                break
        else:
            raise ValueError('Do not come here')

for lv in range(len(lvl)):
    print(rst[0][lv]," ",rst[1][lv])

# Fixed version:
lvl = [1.1, 0.6, 0.2, 0.0] 
rst = [[0]*4 for _ in range(2)]
eyes = []
while True:
    try:
        l,r = map(float,input().strip().split())
        eyes.append([l,r])
    except EOFError:
        break

for e in eyes:
    for lr in range(2):
        for l in range(len(lvl)):
            if e[lr]>=lvl[l]: 
                rst[lr][l] += 1
                break
        else:
            raise ValueError('Do not come here')

for lv in range(len(lvl)):
    print("%d %d" % (rst[0][lv],rst[1][lv]))