#include <iostream>
using namespace std;
int main() {
long double x, y, z, min, max;
int counter, number;
counter = 1;
number = 1;
cin >> x >> y >> z;
min = 0;
min = x;
if(y < min){
min = y;
counter = 1;
}
else if(y == min){
counter ++;
}
if(z < min){
min = z;
counter = 1;
}
else if (z == min){
counter++;
}
max = 0;
max = y;
if(x > max){
max = x;
number = 1;
}
else if(x == max){
number ++;
}
if(z > max){
max = z;
number = 1;
}
else if(z == max){
number ++;
}
if(counter !=1 ){
cout << min << "("<<counter<<")" << endl;
}
else {
cout << min << endl;
}
if(number != 1){
cout << max << "("<<number<<")" << endl;
}
else {
cout << max << endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7Cglsb25nIGRvdWJsZSB4LCB5LCB6LCBtaW4sIG1heDsKCWludCBjb3VudGVyLCBudW1iZXI7Cgljb3VudGVyID0gMTsKCW51bWJlciA9IDE7CgljaW4gPj4geCA+PiB5ID4+IHo7CgltaW4gPSAwOwoJbWluID0geDsKICAgIGlmKHkgPCBtaW4pewoJCW1pbiA9IHk7CgkJY291bnRlciA9IDE7Cgl9CiAgICBlbHNlIGlmKHkgPT0gbWluKXsKCQljb3VudGVyICsrOwoJfQogICAgaWYoeiA8IG1pbil7CgkJbWluID0gejsKCQljb3VudGVyID0gMTsKCX0KCWVsc2UgaWYgKHogPT0gbWluKXsKCQljb3VudGVyKys7Cgl9CgltYXggPSAwOwoJbWF4ID0geTsKCWlmKHggPiBtYXgpewoJCW1heCA9IHg7CgkJbnVtYmVyID0gMTsKCX0KCWVsc2UgaWYoeCA9PSBtYXgpewoJCW51bWJlciArKzsKCX0KICAgIGlmKHogPiBtYXgpewoJCW1heCA9IHo7CgkJbnVtYmVyID0gMTsKCX0KICAgIGVsc2UgaWYoeiA9PSBtYXgpewoJCW51bWJlciArKzsKCX0KCWlmKGNvdW50ZXIgIT0xICl7CgkJY291dCA8PCBtaW4gPDwgIigiPDxjb3VudGVyPDwiKSIgPDwgZW5kbDsKCX0KCWVsc2UgewoJCWNvdXQgPDwgbWluIDw8IGVuZGw7Cgl9CglpZihudW1iZXIgIT0gMSl7CgkJY291dCA8PCBtYXggPDwgIigiPDxudW1iZXI8PCIpIiA8PCBlbmRsOwoJfQoJZWxzZSB7CgkJY291dCA8PCBtYXggPDwgZW5kbDsKCX0KCXJldHVybiAwOwp9