#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
int ans=0;
cin>>a>>b>>c;
vector<int>v;
v.push_back(a);
v.push_back(b);
v.push_back(c);
if(a==b&&b==c){
ans=3;
}
else if(a==b||b==c||a==c){
ans=2;
}
else{
ans=1;
}
sort(v.begin(),v.end());
cout<<ans<<" ";
for(int i=2;i>=0;--i){
if(ans==3){
cout<<v[i];
break;
}
else if(ans==2){
if(v[i]==v[i-1]){
cout<<v[i]<<" "<<v[i-2];
break;
}
else if(v[i]!=v[i-1]){
cout<<v[i]<<" "<<v[i-1];
break;
}
}
else{
cout<<v[i]<<" ";
}
}
return 0;
}