#include <iostream>
using namespace std;
int main()
{
double p3, p6, p12;
cin >> p3 >> p6 >> p12;
double profit3, profit6, profit12;
profit3 = (1 + p3/400.0)*(1 + p3/400.0)*(1 + p3/400.0)*(1 + p3/400.0);
profit6 = (1 + p6/200.0)*(1 + p6/200.0);
profit12 = (1 + p12/100.0);
cout<<profit3<<" "<<profit6<<" "<<profit12<<endl;
cout << (profit3 > profit6 ? (profit3 > profit12 ? ("На 3 месяца") : ("На 12 месяцев")) : (profit6 > profit12 ?("На 6 месяцев") : ("На 12 месяцев")));
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwogCmludCBtYWluKCkgCnsKCWRvdWJsZSBwMywgcDYsIHAxMjsKCWNpbiA+PiBwMyA+PiBwNiA+PiBwMTI7Cglkb3VibGUgcHJvZml0MywgcHJvZml0NiwgcHJvZml0MTI7Cglwcm9maXQzID0gKDEgKyBwMy80MDAuMCkqKDEgKyBwMy80MDAuMCkqKDEgKyBwMy80MDAuMCkqKDEgKyBwMy80MDAuMCk7Cglwcm9maXQ2ID0gKDEgKyBwNi8yMDAuMCkqKDEgKyBwNi8yMDAuMCk7Cglwcm9maXQxMiA9ICgxICsgcDEyLzEwMC4wKTsKCWNvdXQ8PHByb2ZpdDM8PCIgIjw8cHJvZml0Njw8IiAiPDxwcm9maXQxMjw8ZW5kbDsKCWNvdXQgPDwgKHByb2ZpdDMgPiBwcm9maXQ2ID8gKHByb2ZpdDMgPiBwcm9maXQxMiA/ICgi0J3QsCAzINC80LXRgdGP0YbQsCIpIDogKCLQndCwIDEyINC80LXRgdGP0YbQtdCyIikpIDogKHByb2ZpdDYgPiBwcm9maXQxMiA/KCLQndCwIDYg0LzQtdGB0Y/RhtC10LIiKSA6ICgi0J3QsCAxMiDQvNC10YHRj9GG0LXQsiIpKSk7CglyZXR1cm4gMDsKfQ==