#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) rep(i,0,n)

int main()
{
    int a,b,c;
    cin>>a>>b>>c;
    cout<<min(a,min(b,c))<<" "<<max(a,max(b,c))<<endl;
}
