{
    ACM ICPC 2003-2004 NEERC

    Problem:    Data Mining
    Author:     Roman Elizarov
    Solution:   Maxim Babenko
}

{$APPTYPE CONSOLE}

const
    inFile = 'data.in';
    outFile = 'data.out';

    infinity = maxlongint;

var
    n, p, q : int64;
    a, b : integer;
    k : int64;

procedure Solve;
var
    i, j : integer;
    cur : int64;

begin
    if n = 1 then begin
        a := 0;
        b := 0;
        k := q;
    end else begin
        k := infinity;
        for i := 0 to 31 do
            for j := 0 to 31 do
                if p * (1 + 1 shl i) >= q * (1 shl j) then begin
                    cur := (p * (n - 1) * (1 + 1 shl i)) shr j + q;
                    if cur < k then begin
                        k := cur;
                        a := i;
                        b := j;
                    end;
                end;
    end;                
end;

procedure ReadData;
begin
    read(n, p, q);
    if (n < 1) or (n > (1 shl 20)) then
        RunError(239);
    if (p < 1) or (p > (1 shl 10)) then
        RunError(239);
    if (q < 1) or (q > (1 shl 10)) then
        RunError(239);
end;

procedure WriteData;
begin
    writeln(k, ' ', a, ' ', b);
end;

begin
    ReadData;
    Solve;
    WriteData;
end.
