#include <iostream>

using namespace std;

int main()
{
    int a, b, c;
    cin >> a >> b >> c;
    int amax = a > b ? a : b;
    amax = amax > c ? amax : c;
    int amin = a < b ? a : b;
    amin = amin < c ? amin : c;
    cout << amin << " " << amax << "\n";

    return 0;
}

