#include<bits/stdc++.h> using namespace std; int s3(bool a,int x,int y){ if(a){ return x; } return y; } int main(){ int a,b,c; cin>>a>>b; cout<<s3(abs(a-c)<abs(b-c),a,b)<<' '<<s3(abs(a-c)<abs(b-c),b,a); return 0; }