{$q+}
var
    n, a, b, ba, bb: longint;
    best, k, p, q, qb: int64;

begin
    while not seekeof do
    begin
        read(n, p, q);
        if n = 1 then
        begin
            best := q;
            a := 0;
            b := 0;
        end else begin
            best := -1;
            ba := 0;
            bb := 0;
            for b := 0 to 31 do
            begin
                qb := q shl b;
                a := 0;
                while p + (p shl a) < qb do
                    inc(a);
                if not ((p + (p shl a)) shr b >= q) then runerror(239);
                k := (p * (n - 1) + ((p * (n - 1)) shl a)) shr b + q;
                if (best = -1) or (k < best) or ((k = best) and (a < ba)) then
                begin
                    best := k;
                    ba := a;
                    bb := b;
                end;
            end;
            a := ba;
            b := bb;
        end;
        writeln(best, ' ', a, ' ', b);
    end;
end.