include<bits/stdc++.h>

using namespace std;
int a,b;
int main() {
cin>>a>>b;
if(b>a)
swap(a,b);
cout<<a<<"\n"<<b;
return 0;
}