#include<iostream>
using namespace std;
int main()
{
    int a=0, b=0, c=0, s=0;
    int x=0, i=-1;
    while(x!=-1)
    {
        cin>>x;
        i++;
        if(x==1)
            a++;
        else if(x==2)
            b++;
        else if(x==3)
            c++;
    }
    s=a+b+c;
    printf("A=%d\nB=%d\nC=%d\nTot=%d\n", a, b, c, s);
    if(a>i/2)
        cout<<"A-yes";
    else if(b>i/2)
        cout<<"B-yes";
    else if(c>i/2)
        cout<<"C-yes";
    else
        cout<<"all-NO";
    return 0;
}