/* 
 * File:   main.cpp
 * Author: freebsd
 *
 * Created on 2014/08/28, 10:07
 */

#include <cstdio>

using namespace std;

int main() {
    int Al = 0, Bl = 0, Cl = 0, Dl = 0;
    int Ar = 0, Br = 0, Cr = 0, Dr = 0;
    double templ = 0, tempr = 0;
    
    int i = 0;
    
    while (i != 40) {
        scanf("%f %f", &templ, &tempr);
    
        if(templ >= 1.1) {
            Al++;
        }else if (templ >= 0.6 && templ < 1.1) {
            Bl++;
        }else if (templ >= 0.2 && templ < 0.6) {
            Cl++;
        }else {
            Dl++;
        }
    
        if(tempr >= 1.1) {
            Ar++;
        }else if (tempr >= 0.6 && tempr < 1.1) {
            Br++;
        }else if (tempr >= 0.2 && tempr < 0.6) {
            Cr++;
        }else {
            Dr++;
        }
        
        i++; 
    }
    
    printf("%d %d\n", Al, Ar);
    printf("%d %d\n", Bl, Br);
    printf("%d %d\n", Cl, Cr);
    printf("%d %d\n", Dl, Dr);
    
    return 0;
}