#include <iostream>
#include <string>
using namespace std;
int main() {
int biggest;
int smallest;
int num1;
int num2;
int num3;
cin >> num1;
cin >> num2;
cin >> num3;
biggest = num1;
smallest = num1;
if(num1 > biggest) biggest = num1;
if(num1 < smallest) smallest = num1;
if(num2 > biggest) biggest = num2;
if(num2 < smallest) smallest = num2;
if(num3 > biggest) biggest = num3;
if(num3 < smallest) smallest = num3;
cout << biggest << endl;
cout << smallest << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CiBpbnQgYmlnZ2VzdDsKIGludCBzbWFsbGVzdDsKIGludCBudW0xOwogaW50IG51bTI7CiBpbnQgbnVtMzsKCiAKIGNpbiA+PiBudW0xOwogY2luID4+IG51bTI7CiBjaW4gPj4gbnVtMzsKIAogYmlnZ2VzdCA9IG51bTE7CiBzbWFsbGVzdCA9IG51bTE7CiAKIGlmKG51bTEgPiBiaWdnZXN0KSBiaWdnZXN0ID0gbnVtMTsKIGlmKG51bTEgPCBzbWFsbGVzdCkgc21hbGxlc3QgPSBudW0xOwogaWYobnVtMiA+IGJpZ2dlc3QpIGJpZ2dlc3QgPSBudW0yOwogaWYobnVtMiA8IHNtYWxsZXN0KSBzbWFsbGVzdCA9IG51bTI7CiBpZihudW0zID4gYmlnZ2VzdCkgYmlnZ2VzdCA9IG51bTM7CiBpZihudW0zIDwgc21hbGxlc3QpIHNtYWxsZXN0ID0gbnVtMzsKIAogY291dCA8PCBiaWdnZXN0IDw8IGVuZGw7CiBjb3V0IDw8IHNtYWxsZXN0IDw8IGVuZGw7CiAKIAoJcmV0dXJuIDA7Cn0=