#include<iostream>
using namespace std;
void compare(int a,int b,int *big,int *small)
{
if(a>b)
{
*big=a;*small=b;
}else
{
*big=b;*small=a;
}
}
int main()
{
int p,q,x,y;
cin>>x>>y;
compare(x,y,&p,&q);
cout<<p<<" "<<q;
return 0;
}
#include<iostream>
using namespace std;
void compare(int a,int b,int *big,int *small)
{
if(a>b)
{
*big=a;*small=b;
}else
{
*big=b;*small=a;
}
}
int main()
{
int p,q,x,y;
cin>>x>>y;
compare(x,y,&p,&q);
cout<<p<<" "<<q;
return 0;
}