#include "bits/stdc++.h"
#define rep(i,a,n) for(int i = a;i < n;i++)
typedef unsigned long long ull;
typedef long long ll;
using namespace std;

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