#include <bits/stdc++.h>
#include <vector>
 
typedef long long ll;
#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))
#define rep(i, n) for (int i = 0; i < (n); ++i)
const double PI=3.14159265358979323846;
 
using namespace std;
 
int main() {

	int n = 3;

	int a[n];

	rep(i, n) cin >> a[i];

	sort(a, a+n);

	cout << a[0] << ' ' << a[2] << endl; 
}
