#include <iostream>
using namespace std;
int main(void){
    int a,b,c,max,min;
    cin>>a>>b>>c;
    max=a;
    min=a;
    if(max<b)   max=b;
    if(max<c)   max=c;
    if(min>b)   min=b;
    if(min>c)   min=c;
    cout<<min<<" "<<max;
    cout<<endl;
}

