#include <bits/stdc++.h> using namespace std; int main() { int n , sum = 0 , len = 0; int a[1000]; while(cin >> n , n != (-1) ) { len ++; if(n >= 1 && n <= 3) sum += 1; a[n] ++; }
cout << "A=" << a[1] << endl << "B=" << a[2] << endl << "C=" << a[3] << endl << "Tot=" << sum << endl;
int m = 0;
if( a[1] > a[2] && a[1] > a[3] && a[1] > (len / 2) ) puts("A-yes");
else if( a[2] > a[1] && a[2] > a[3] && a[2] > (len / 2) ) puts("B-yes");
else if( a[3] > a[1] && a[3] > a[2] && a[3] > (len / 2) ) puts("C-yes");
else puts("all-NO");
return 0;
}