#include<stdio.h>
int main(void){
    int c[1000] = { 0 }, d[100], count[3000], i = 0;
    while( scanf("%d,%d", &c[i], &d[i]) !=EOF ) {
        count[c[i]]++;
        i++;
    }
    n = i;
    for ( i = 0; i < n; i++ ) {
        if ( count)
    }
}