Salut. Uite aici rezolvarea problemei. Succes in continuare!
#include <iostream>
using namespace std;
int main()
{
long long n;
int k=0,h=0,r;
cin>>n;
while(n)
{
r=n%10;
if(r==2)
k++;
else
h++;
n=n/10;
}
if(k==h)
cout<<2<<" "<<3;
else if(k>h)
cout<<2;
else
cout<<3;
return 0;
}