int a[3];
cin>>a[0]>>a[1]>>a[2];
sort(a,a+3);
if(a[0]==a[1] && a[1]==a[2]) cout<<3<<" "<<a[0]<<endl;
else if(a[0]==a[1] && a[1]!=a[2]) cout<<2<<" "<<a[2]<<" "<<a[0]<<endl;
else if(a[0]!=a[1] && a[1]==a[2]) cout<<2<<" "<<a[2]<<" "<<a[0]<<endl;
else if(a[0]!=a[1] && a[1]!=a[2]) cout<<1<<" "<<a[2]<<" "<<a[1]<<" "<<a[0]<<endl;