#include<iostream>
using namespace std;
int a,b,c;
int main()
{
while (cin>>a>>b>>c)
{
if(a==b&&a==c&&b==c)
{
cout<<"3"<<" "<<a;
}
else if (a==b||b==c||a==c)
{
if (a==b)
{
if(a>c)
{
cout<<"2"<<" "<<a<<" "<<c;
}
else if(a<c)
{
cout<<"2"<<" "<<c<<" "<<a;
}
}
else if(b==c)
{
if(a>c)
{
cout<<"2"<<" "<<a<<" "<<c;
}
else if(a<c)
{
cout<<"2"<<" "<<c<<" "<<a;
}
}
else if(a==c)
{
if(b>c)
{
cout<<"2"<<" "<<b<<" "<<c;
}
else if(b<c)
{
cout<<"2"<<" "<<c<<" "<<b;
}
}
}
else if(a!=b&&b!=c&&a!=c)
{
if(a>b&&a>c)
{
if(b>c)
{
cout<<"1"<<" "<<a<<" "<<b<<" "<<c;
}
else if(b<c)
{
cout<<"1"<<" "<<a<<" "<<c<<" "<<b;
}
}
else if(b>c&&b>a)
{
if(a>c)
{
cout<<"1"<<" "<<b<<" "<<a<<" "<<c;
}
else if(a<c)
{
cout<<"1"<<" "<<b<<" "<<c<<" "<<a;
}
}
else if(c>a&&c>b)
{
if(a>b)
{
cout<<"1"<<" "<<c<<" "<<a<<" "<<b;
}
else if(a<b)
{
cout<<"1"<<" "<<c<<" "<<b<<" "<<a;
}
}
}
}
}