Bob is about to take a hot bath. There are two taps to fill the bath: a hot water tap and a cold water tap. The cold water's temperature is t1, and the hot water's temperature is t2. The cold water tap can transmit any integer number of water units per second from 0 to x1, inclusive. Similarly, the hot water tap can transmit from 0 to x2 water units per second.If y1 water units per second flow through the first tap and y2 water units per second flow through the second tap, then the resulting bath water temperature will be:Bob wants to open both taps so that the bath water temperature was not less than t0. However, the temperature should be as close as possible to this value. If there are several optimal variants, Bob chooses the one that lets fill the bath in the quickest way possible.Determine how much each tap should be opened so that Bob was pleased with the result in the end.

You are given five integers t1, t2, x1, x2 and t0 (1 ≤ t1 ≤ t0 ≤ t2 ≤ 106, 1 ≤ x1, x2 ≤ 106).

Print two space-separated integers y1 and y2 (0 ≤ y1 ≤ x1, 0 ≤ y2 ≤ x2).

NoteIn the second sample the hot water tap shouldn't be opened, but the cold water tap should be opened at full capacity in order to fill the bath in the quickest way possible.

const fi='';
      fo='';
var t1,t2,j,t0,resx,resy:int64;
    i,x1,x2:longint;
    res:extended;
begin
    assign(input,fi);
    reset(input);
    assign(output,fo);
    rewrite(output);
    readln(t1,t2,x1,x2,t0);
    if (t1=t2) and (t2=t0) then
	begin
		writeln(x1,' ',x2);
		halt;
	end;
    if t2=t0 then
        begin
            writeln(0,' ',x2);
            halt;
        end;
    if t1=t0 then
        begin
            writeln(x1,' ',0);
            halt;
        end;
    res:=maxlongint;
    for i:=0 to x1 do
        begin
            if i<>0 then j:=(i*t0-i*t1) div (t2-t0) else j:=x2;
            if (i*t0-i*t1) mod (t2-t0)<>0 then inc(j);
            if (j<=x2) and ((t1*i+t2*j)/(i+j)-t0<=res) then
                begin
                    res:=(t1*i+t2*j)/(i+j)-t0;
                    resx:=i;
                    resy:=j;
                end;
        end;
    writeln(resx,' ',resy);
    close(input);
    close(output);
end.

    const
            fi='';
            fo='';
    var
            tmin:real;
            t1,t2,x1,x2,t0,max,r1,r2,y1,y2:int64;
    procedure init;
    begin
            assign(input,fi);
            assign(output,fo);
            reset(input);
            rewrite(output);
            readln(t1,t2,x1,x2,t0);
            tmin:=maxlongint;
    end;

    procedure bs;
    var
            check:boolean;
            a,b,l,r,mid:int64;
            tmp:real;
            r1:longint;
    begin
            for r1:=0 to x1 do
            begin
                    a:=t1*int64(r1);
                    l:=0;           r:=x2;
                    check:=false;
                    repeat
                            mid:=(l+r)div 2;
                            if check=false then
                            begin
                                mid:=x2;
                                check:=true;
                            end;
                            if(r1+mid)=0 then
                            begin
                                    if t1>=t0 then
                                    begin
                                            if(t1<tmin)or((t1=tmin)and
                                            (max<x1))then
                                            begin
                                                    max:=x1;
                                                    tmin:=t1;
                                                    y1:=x1;
                                                    y2:=mid;

                                            end;
                                            r:=mid-1;
                                    end
                                    else
                                            l:=mid+1;
                                    if l>r then break;
                                    continue;
                            end
                            else
                                    tmp:=(a+t2*mid)/(r1+mid);
                            if tmp>=t0 then
                            begin
                                    if(tmp<tmin)or((tmp=tmin)and(max<r1+mid))then
                                            begin
                                                    max:=r1+mid;
                                                    tmin:=tmp;
                                                    y1:=r1;
                                                    y2:=mid;
                                            end;
                                    r:=mid-1;
                            end
                            else
                                    l:=mid+1;
                    until l>r;
            end;
            writeln(y1,' ',y2);
    end;

    begin
            init;
            bs;
    end.

const   fi='';
        fo='';
var     t1,t2,x1,x2,t0,y1,y2:longint;
procedure       rinf;
begin
        assign(input,fi);
        reset(input);
        read(t1,t2,x1,x2,t0);
        close(input);
end;

procedure       solve;
var     i:longint;
        k:int64;
        s,t:real;
begin
        if t1=t2 then
          begin
                y1:=x1;
                y2:=x2;
                exit;
          end;
        if t0=t1 then
          begin
                y1:=x1;
                y2:=0;
                exit;
          end;
        if t0=t2 then
          begin
                y1:=0;
                y2:=x2;
                exit;
          end;
        s:=t2;
        y1:=0;y2:=x2;
        for i:=1 to x1 do
          begin
                if int64((t0)-int64(t1))*int64(i) mod int64((t2)-int64(t0))=0 then
                  k:=int64((t0)-int64(t1))*int64(i) div int64((t2)-int64(t0))
                else
                  k:=int64((t0)-int64(t1))*int64(i) div int64((t2)-int64(t0))+1;
                if (i+k<>0) and (x2>=k)and (k>=0) then
                t:=(int64(t1)*int64(i)+int64(t2)*int64(k))/(i+k)
                else t:=maxlongint;
                if s>t then
                  begin
                        s:=t;
                        y1:=i;
                        y2:=k;
                  end
                else
                  if (s=t)and(y1+y2<i+k) then
                    begin
                        y1:=i;
                        y2:=k;
                    end;
          end;
end;

procedure       winf;
begin
        assign(output,fo);
        rewrite(output);
        write(y1,' ',y2);
        close(output);
end;

begin
        rinf;
        solve;
        winf;
end.

var t1,t2,x1,x2,t0,y2,a1,a2:int64;
    y1:longint;
    t,ans:extended;
begin
   readln(t1,t2,x1,x2,t0);
   ans:=maxlongint;
    if t2=t1 then
    begin
      writeln(x1,' ',x2);
      halt;
    end;
   if t0=t1 then
    begin
      writeln(x1,' ',0);
      halt;
    end;
   if t0=t2 then
    begin
      writeln(0,' ',x2);
      halt;
    end;

   for y1:=1 to x1 do
    begin
     if (y1*(t0-t1))/(t2-t0)-trunc((y1*(t0-t1))/(t2-t0))=0 then
      y2:=trunc(y1*(t0-t1)/(t2-t0))
       else y2:=1+trunc(y1*(t0-t1)/(t2-t0));
     if y2>x2 then continue;
     t:=((t1*y1)+(t2*y2))/(y1+y2);
     if (t>=t0) and ((t<ans) or ((t=ans) and (a1+a2<y1+y2))) then
      begin
       ans:=t;
       a1:=y1;
       a2:=y2;
      end;
    end;

   if (a1=0) and (a2=0) then
    writeln(0,' ',x2)
     else writeln(a1,' ',a2);
end.

uses Math;
Var N,M,j,k,l,v,r,t1,t2,t0,x1,x2,minx1,minx2,y2,y1:int64;
i:longint;
t,t3:extended;
Begin
{assign(input,'input.txt');
reset(input);
assign(output,'output.txt');
rewrite(output);}
readln(t1,t2,x1,x2,t0);
t:=t2;
minx1:=0;
minx2:=x2;
v:=x2;
if (t1=t0) and (t2=t0) then
    begin
      writeln(x1,' ',x2);
      halt(0);
    end;
    if t1=t0 then
    begin
      writeln(x1,' ',0);
      halt(0);
    end;
    if t2=t0 then
    begin
      writeln(0,' ',x2);
      halt(0);
    end;
For i:=0 to x1 do begin
  //l:=0;
  //r:=x2;
  y1:=i;
  v:=0;
 // While l<=r do begin
    y2:=trunc((t0-t1)/(t2-t0)*i+0.999999999);
    if y2<=x2 then begin
      {if y1+y2>v then begin
        v:=y1+y2;
        minx1:=y1;
        minx2:=y2;
      end;
    end; }
   // m:=(l+r) div 2;
    if (i<>0) or (y2<>0) then
      t3:=((t1*i)+(t2*y2))/(i+y2)
    else
      t3:=maxlongint;
   { if t3<t0 then
      l:=m+1
    else begin}
      if (t3-t0=t) and (v<y2+i) then
      begin
        t:=t3-t0;
        v:=m+i;
        minx1:=i;
        minx2:=y2;
      end;
      if t3-t0<t then
      begin
        t:=t3-t0;
        v:=m+i;
        minx1:=i;
        minx2:=y2;
      end;
   // r:=m-1;
    end;
  //end; }
end;
writeln(minx1,' ',minx2);
end.

program pr1;

{$APPTYPE CONSOLE}

{type int64=longint; }
const
 eps=1e-13;  nnn=2000000;
 label 1;
var t1,t2,x1,x2,y1,yy2,t0,nn,ot,mmax,w,t,kol,j,m,k,imax,p,h,jj:int64;
n,s,step2:int64;
i,y2:longint;
blizt:array[0..1000000,-1..3] of double;
minotkl:double; y1bl,ibl,y2bl:longint;

flag,flagggg:boolean;
ott:double;
function min (a,b:longint):longint;begin min:=b;if a<b then min:=a;  end;
function max (a,b:longint):longint;begin max:=b;if a>b then max:=a;  end;

function nod(a,b:longint):longint; var p,t:longint;
begin if (a>0)and(b>0) then
   begin while (b>0) do begin t:=a mod b;a:=b;b:=t;    end;
    p:=a;
   end else if a=0 then p:=b else p:=a;
nod:=p;
end;

function pr(n:longint):boolean; var i,j:longint;flag:boolean;
 begin  flag:=true;
      for i:=2 to n-1 do if n mod i=0 then flag:=false;
   pr:=flag;
 end;

begin
{assign (input,'input.txt');reset(input);
      assign (output,'output.txt'); rewrite(output);
}read(t1,t2,x1,x2,t0);
if (t1=t0)and(t2=t0) then begin  writeln(x1,' ',x2);goto 1;  end;
if (t1=t0)and(t2>t0) then begin  writeln(x1,' ',0);goto 1;  end;
if (t1<t0)and(t2=t0) then begin  writeln(0,' ',x2);goto 1;  end;
  for y2:=0 to x2 do
begin
    yy2:=y2;
  y1:=min(trunc(yy2*(t0-t2)/(t1-t0)),x1); {writeln(y2,' ',y1);  }
   for i:=0 to 0 do
 begin
   if (y1+i+yy2<>0)and(y1+i<=x1) then blizt[y2,i]:=(t1*(y1+i)+t2*yy2)/(y1+i+yy2)
   else blizt[y2,i]:=100000000;

  end;
end;

{for y2:=0 to x2 do
 begin write(y2,'   '); for i:=-1 to 2 do write(blizt[y2,i]:0:3,' ');writeln;  end;
}

minotkl:=100000000;
 for y2:=x2 downto 0 do for i:=0 to 0 do
   begin   y1:=min(trunc(y2*(t0-t2)/(t1-t0)),x1);
    if ((y1+i)<=x1)and(blizt[y2,i]>=t0-eps)and (abs(blizt[y2,i]-t0)<=minotkl-eps) then
        begin
          y2bl:=y2;
          ibl:=i;minotkl:=abs(blizt[y2,i]-t0) ;
          y1bl:=y1+i;
          {writeln('ttt ',y2,' ',y1); }
        end;

   end;
writeln(y1bl,' ',y2bl);

   1:   close(output);
end.

{$apptype console}
{$R+,S+,I+,Q+}
const
     inf = 'input.txt';
     outf = 'output.txt';
var
 y1,i:longint;
 t1,t2,x1,x2,t0,a1,a2,y2:int64;

 procedure check(y1,y2:int64);
  begin
   if t0*(y1+y2) <= t1*y1+t2*y2 then
    begin
     if (t1*y1+t2*y2)*(a1+a2) < (t1*a1+t2*a2)*(y1+y2) then
      begin
       a1:=y1;
       a2:=y2;
      end else
     if ((t1*y1+t2*y2)*(a1+a2) = (t1*a1+t2*a2)*(y1+y2)) and (y1+y2 > a1+a2) then
      begin
       a1:=y1;
       a2:=y2;
      end;
    end;
  end;

begin
 //reset(input,inf);
 //rewrite(output,outf);
 read(t1,t2,x1,x2,t0);
 if t1 = t2 then
  begin
   writeln(x1,' ',x2);
   halt;
  end;
 if t1 = t0 then
  begin
   writeln(x1,' ',0);
   halt;
  end;
 if t2 = t0 then
  begin
   writeln(0,' ',x2);
   halt;
  end;
 a1:=0; a2:=x2;
 for y1:=0 to x1 do
  begin
   y2:=round(int64(y1)*(t0-t1)/(t2-t0));
   if y2 > round(1e6)+10 then continue;
   for i:=y2-1 to y2+1 do if (i >= 0) and (i <= x2) then check(y1,i);
  end;
 writeln(a1,' ',a2);
end.

Var i,j:longint;
ee,l1,r1,l,r,k,t1,t2,x1,x2,t0:int64;
minRaz:extended;
begin
  //Assign(Input,'input.txt');
 // Assign(Output,'output.txt');
  Readln(t1,t2,x1,x2,t0);
  l1:=0; r1:=0;
  minRaz:=MaxInt;
  ee:=1;
  if t1=t0
  then ee:=0;
  for i:=ee to x2 do
  begin
    l:=0; r:=x1+1;
    for j:=1 to 30 do
    begin
      k:=(l+r) div 2;
      if k+i=0
      then l:=k
      else if (t1*k+t2*i)/(k+i)>=t0
           then l:=k
           else r:=k;
    end;
    if ((t1*l+t2*i)/(l+i)-t0<minRaz)or(((t1*l+t2*i) / (i+l)-t0=minRaz)and(l+i>L1+r1))
    then begin minraz:=(t1*l+t2*i) / (i+l)-t0; l1:=l; r1:=i; end;
  end;
  writeln(l1,' ',r1);
end.

{$APPTYPE CONSOLE}
{$maxstacksize 10000000}
{$b-}
{$r-}
const eps=1e-10;
var
 bc,bz,anc,anz,t1,t2,t0,x1,x2:int64;
 pc,ac,az:array[1..2000001] of int64;
 i1,i:integer;
 best:extended;

 Function nod(a,b:int64):int64;
 begin
  If b=0 then nod:=a else nod:=nod(b,a mod b);
 end;

 Procedure bins(q:int64);
 var
  i,j:integer;
  pp,mn,ff,c,d,mc,mz:int64;
 begin
  i:=0;
  If q>x2 then j:=x2 else j:=q;
    mc:=0;
    mz:=0;
    mn:=1000000000000000;
  repeat
    d:=(i+j) div 2;
    c:=q-d;
    pp:=t0*q;
    If (d>x2) then j:=d-1
    else If (c>x1) then i:=d+1 else
    begin
     ff:=c*t1+d*t2;
    // writeln(t0*q,' ',ff);
     If pp>ff then i:=d+1
     else
     begin
      j:=d-1;
      If (ff-pp<mn)  then
      begin
       mc:=c;
       mz:=d;
       pc[q]:=ff;
       mn:=ff-pp;
      end;
     end;
    end;
  until i>j;
  ac[q]:=mc;
  az[q]:=mz;
  //writeln(mc,' ',mz);
  //If q=130 then writeln(ac[q],' ',az[q],' ',pc[q],' ',pz[q]);
 end;

begin
 {reset(input,'Input.txt');
 rewrite(output,'Output.txt');}
 readln(t1,t2,x1,x2,t0);

 For i:=1 to x1+x2 do bins(i);

 best:=1000000000000000;
 anc:=0;
 anz:=0;
 bc:=0;
 bz:=0;

 For i:=x1+x2 downto 1 do
 begin
  i1:=i;
  pc[i]:=pc[i];

  If (pc[i]=bc) and (i1=bz) and (pc[i]<>0) then
  begin
   anc:=ac[i];
   anz:=az[i];
   bc:=pc[i];
   bz:=i1;
   best:=bc/bz;
  end
  else If (pc[i]<>0) and (pc[i]/i1>=t0) and (pc[i]/i1<best-eps) then
  begin
    anc:=ac[i];
    anz:=az[i];
    bc:=pc[i];
    bz:=i1;
    best:=bc/bz;
  end;
 end;

 //For i:=1 to x1+x2 do writeln(ac[i],' ',az[i]);

 writeln(anc,' ',anz);
end.

{$R+,Q+,I+}
{$apptype console}
Uses SysUtils;
Const
   e=0.0000001;
Var
   t1,t2,x1,x2,t0,t,j:Int64;
   i1,j1,i:Integer;
   r,s,t3:Real;
Begin
   Read(t1,t2,x1,x2,t0);
   If (t1=t2) and (t2=t0) Then Begin
      Write(x1,' ',x2);
      Halt;
   End;
   If t0=t1 Then Begin
      If (t0=t2) and (x2>x1) Then Write(0,' ',x2)
                             Else Write(x1,' ',0);
      Halt;
   End;
   If t0=t2 Then Begin
      Write(0,' ',x2);
      Halt;
   End;
   r:=High(Integer);
   t:=High(Integer);
   i1:=0;
   j1:=0;
   For i:=0 To x1 Do Begin
      s:=i*(t1-t0)/(t0-t2);
      j:=Round(s);
      If j<s Then j:=j+1;
      If j>x2 Then j:=x2;
      If j<0 Then j:=0;
      If (i=0) and (j=0) Then Continue;
      t3:=(t1*i+t2*j)/(i+j);
      If t3>=t0 Then Begin
         If (abs(t3-t0-r)<e) and (i+j>t) Then Begin
            t:=i+j;
            i1:=i;
            j1:=j;
         End
         Else If t3-t0<r Then Begin
            r:=t3-t0;
            t:=i+j;
            i1:=i;
            j1:=j;
         End;
      End;
   End;
   If (i1<>0) and (j1<>0) Then Write(i1,' ',j1)
   Else Begin
      If (t1=t0) and (x1>x2) Then Write(x1,' ',0)
                             Else Write(0,' ',x2);
   End;
End.

{$R+,S+,Q+,I+,O-}
{R-,S-,Q-,I-,O+}
var
  m1,m2,t1,t2,x1,x2,t0,y1,y2,z1,z2,max,a,b: int64;

procedure go(y1,y2:int64);
var
  d1,d2: int64;
begin
  d1:=t1*y1+t2*y2-t0*y1-t0*y2;
  d2:=y1+y2;
  if d1 < 0 then exit;
  if (d1*m2 < m1*d2) or (d1*m2 = m1*d2) and (y1+y2 > max) then
  begin
    m1:=d1;
    m2:=d2;
    max:=y1+y2;
    z1:=y1; z2:=y2;
  end;
end;

begin
//  assign(input,'in'); reset(input);
//  assign(output,'out'); rewrite(output);
  read(t1,t2,x1,x2,t0);
  m1:=1; m2:=0;
  max:=-1;
  z1:=0; z2:=0;
  go(0,x2);
  y1:=1;
  while y1 <= x1 do
  begin
    a:=t2-t0;
    b:=y1*(t0-t1);
    // a*y2 >= b
    if a > 0 then
    begin
      y2:=(b+a-1) div a;
      if y2 <= x2 then go(y1,y2);
    end
    else go(y1,x2);
    inc(y1);
  end;
  writeln(z1,' ',z2);
  close(input);
  close(output);
end.

var
  t1,t2,x1,x2,t0,minx,minf,f,min : int64;
  x : longint;
  px,tx,mint,fx : extended;
  ok : boolean;

  function _round(x : extended) : longint;
  begin
    _round:=round(x);
  end;

begin
 { assign(input,'input.txt'); reset(input);
  assign(output,'output.txt'); rewrite(output);}
  readln(t1,t2,x1,x2,t0);
  min:=-maxlongint;
  mint:=maxlongint;
  if (t1=t0) and (t2=t0)
    then begin
      ok:=true;
      minx:=x1; minf:=x2;
    end
    else begin
      if (t1=t0) then begin ok:=true; minx:=x1; minf:=0; end;
      if (t2=t0) then begin ok:=true; minx:=0; minf:=x2; end;
    end;
  if (t1<>t0) and (t2<>t0) then begin
  ok:=false;
  for x:=1 to x1 do begin
    px:=(t0*x-t1*x)/(t2-t0);
    if (px<=x2) and (px>=0)
      then begin
        f:=_round(px);
        tx:=(t1*x+t2*f)/(x+f);
        fx:=tx-t0;
        if (fx<0) then begin
          f:=trunc(px)+1;
          tx:=(t1*x+t2*f)/(x+f);
          fx:=tx-t0;
        end;
        if (fx<=mint) and (fx>=0)  then
          if (x+f>min) or ((fx<mint) and (fx>=0)) then begin
             minx:=x; minf:=f; min:=x+f; mint:=fx;
             ok:=true;
          end;
      end;
  end;
  end;
  if (not ok) then minf:=x2;
  writeln(minx,' ',minf);
  close(input); close(output);
end.

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils, Math;

const
  eps = 1e-12;

var
  bsum, a, b: Int64;
  t, f: Extended;
  t1, t2, x1, x2, t0: Int64;
  y1, y2: Integer;

begin
  //Reset(input, 'input.txt'); Rewrite(output, 'output.txt');
  Readln(t1, t2, x1, x2, t0);
  y1 := 0;
  t := maxint; bsum := -1; a := -1; b := -1;
  for y2 := 0 to x2 do
    begin
      while True do
        begin
          if (y1+y2 > 0) then
            begin
              f := (1.0*y1*t1+y2*t2)/(y1+y2);
              if (f - t0 < t - t0) or (samevalue(f-t0, t-t0, eps) and (y1+y2 > bsum)) then
                begin
                  a := y1; b := y2; bsum := y1 + y2; t := f;
                end;
            end;
          Inc(y1);
          if (y1 + y2 = 0) or ((1.0*y1*t1+y2*t2)/(y1+y2) < t0) or (y1 > x1) then
            begin
              Dec(y1); break;
            end;
          if (y1+y2 > 0) then
            begin
              f := (1.0*y1*t1+y2*t2)/(y1+y2);
              if (f - t0 < t - t0) or (samevalue(f-t0, t-t0, eps) and (y1+y2 > bsum)) then
                begin
                  a := y1; b := y2; bsum := y1 + y2; t := f;
                end;
            end;
        end;
    end;
  Writeln(a, ' ', b);
end.

{$APPTYPE CONSOLE}
{$MAXSTACKSIZE $11000000}
{$R-,Q-,S+,O-}
const
  eps = 1e-11;
var
  x1, y1, x2, ans1, Ans2, y2, t1,t2, t0 : Int64;
  i : longint;
function eq(x, y : extended) : Boolean;
begin
  result := y - x > eps;
end;
function neq(x, y : extended) : boolean;
begin
  result := (x - y < eps) and (y - x < eps);
end;
begin
//  reset(input, 'input.txt');
//  rewrite(output, 'output.txt');
  Readln(t1, t2, x1, x2, t0);
  if t2 = t0 then
    begin
      if t1 = t2 then
        writeln(x1, ' ', x2)
      else
        Writeln(0, ' ', x2);
      exit;
    end;
  ans1 := -1;
  Ans2 := -1;
  for i := 0 to x1 do
    begin
      y1 := i;
      y2 := ((y1 * (t0 - t1)) div (t2 - t0  ));
      if y1 = 0 then
        y2 := x2;
      if (t1 * y1 + t2 * y2) div (y1 + y2) < t0 then
        inc(y2);
      if y2 > x2 then
        y2 := x2;
      if (t1 * y1 + y2 * t2) div (y1 + y2) < t0 then
        Continue;
      if (ans1 = -1) or (eq((t1 * y1 + t2 * y2) / (y1 + y2), (t1 * Ans1 + t2 * ans2) / (ans1 + ans2))) or (neq((t1 * y1 + t2 * y2) / (y1 + y2), (t1 * Ans1 + t2 * ans2) / (ans1 + ans2))) and (y1 + y2 > ans1 + ans2) then
        begin
          ans1 := y1;
          ans2 := y2;
        end;
    end;
  writeln(ans1, ' ', ans2);
end.

{$r-,q-,s-,o+}
{$IFNDEF ONLINE_JUDGE}
{$o-,r+,q+,s-}
{$ENDIF}
{$M 16777216}
program TASK_3;

uses
  SysUtils,
  math;
var i,x1,x2:integer;
    min,ansx,ansy,t1,t2,t0,x,xx:int64;getted:extended;

begin
 {$IFNDEF ONLINE_JUDGE}
   assign(input, 'input.txt');reset(input);
   assign(output, 'output.txt');rewrite(output);
 {$ENDIF}min:=0;
  readln(t1,t2,x1,x2,t0);getted:=10000000000000;
  if (t1=t2)and(t2=t0) then begin writeln(x1,' ',x2); halt(0); end;
  if t1=t0 then begin writeln(x1,' ',0);halt(0); end;
  if t2=t0 then begin writeln(0,' ',x2); halt(0); end;
  for i:=0 to x1 do
   begin
     if i<>0 then  x:=(t0*i-t1*i) div (t2-t0) else x:=x2;
     if (t0*i-t1*i) mod (t2-t0) <> 0 then inc(x);
     if (x+i<>0)and(x<=x2)and((t1*i+t2*x)/(x+i)-t0<=getted) then begin getted:=(t1*i+t2*x)/(x+i)-t0; min:=x+i; ansX:=x;ansy:=i; end;
  end;
 writeln(ansY, ' ' ,ansX);
end.

program shower;
const inf = 1000*1000;
var t1,t2,t0,x1,x2,i : longint;
    j,t3,t4 : int64; delta,k,l : extended;
begin
  delta:= inf;
  readln(t1,t2,x1,x2,t0);
  if (t1 = t0) or (t2 = t0) then begin
    if t1 = t2 then writeln(x1,' ',x2)
    else if t1 = t0 then writeln(x1,' ',0)
                    else writeln(0,' ',x2);
    exit;
  end;

    for i:= x1 downto 0 do
    begin
      j:= (t0 - t1);
      if (((j*i) mod (t2 - t0)) = 0) then j:= ((j * i) div (t2 - t0))
                                     else j:= ((j * i) div (t2 - t0)) + 1;
      if (j > x2) or (i = 0) then j:= x2;
      k:= t1; k:= k*i; l:= t2; l:= l*j;
      k:= (k + l) / (i+j);
      {writeln(i,' ',j,' ',k:5:5,' ',delta:5:5); }
      if (k >= t0) and ((k - t0) < delta) then begin
        delta:= k - t0;
        t3:= i; t4:= j;
      end;
    end;
    writeln(t3,' ',t4);
end.

const
        fi='';
var
        f:text;
        t1,t2,x1,x2,t0,ra1,ra2:longint;
        tmp:real;
procedure nhap;
begin
        assign(f,fi);
        reset(f);
        readln(f,t1,t2,x1,x2,t0);
        close(f);
end;
procedure xuly;
var
        u,x,q,v:real;
        i:longint;
        dm1,dm2,dm3,k:int64;
begin
        if t1=t2 then
        begin
                ra1:=x1; ra2:=x2;
                exit;
        end;
        if t2=t0 then
        begin
                ra1:=0; ra2:=x2;
                exit;
        end;
        u:=(t0-t1)/(t2-t0);
        tmp:=t2;
        ra1:=0; ra2:=x2;
        for i:=1 to x1 do
        begin
                v:=i*u;
                q:=v;
                v:=trunc(v);
                if v<=x2 then
                begin
                        k:=trunc(v);
                        dm1:=int64(t1)*int64(i);
                        dm2:=int64(t2)*int64(k);
                        dm3:=int64(k)+int64(i);
                        x:=(dm1+dm2)/dm3;
                        if x>=t0 then
                        begin
                        if x<tmp then
                        begin
                                ra1:=i;
                                ra2:=k;
                                tmp:=x;
                        end
                        else
                        if x=tmp then
                        begin
                                if (i+k)>(ra1+ra2) then
                                begin
                                        ra1:=i;
                                        ra2:=k;
                                end;
                        end;
                        end;
                end;
                if q+0.5>trunc(q) then
                begin
                v:=trunc(q)+1;
                if v<=x2 then
                begin
                        k:=trunc(v);
                        dm1:=int64(t1)*int64(i);
                        dm2:=int64(t2)*int64(k);
                        dm3:=int64(k)+int64(i);
                        x:=(dm1+dm2)/dm3;
                        if x<t0 then continue;
                        if x<tmp then
                        begin
                                ra1:=i;
                                ra2:=k;
                                tmp:=x;
                        end
                        else
                        if x=tmp then
                        begin
                                if (i+k)>(ra1+ra2) then
                                begin
                                        ra1:=i;
                                        ra2:=k;
                                end;
                        end;
                end;
                end;
        end;
end;
begin
        nhap;
        xuly;
        writeln(ra1,' ',ra2);
end.

{$mode delphi}
program Project1;
Uses SysUtils, Math;
var y2,t1,t2,x1,x2,t,y1:longint;
		min,t0:extended;
    miny1,miny2:int64;
function f(y1,y2:longint):extended;
var l:extended;
begin
	l:= t1 * (y1 / (y1 + y2)) + t2 * (y2 / (y1 + y2)) - t;
  f:=l;
end;
procedure check (y1,y2:int64);
	begin
  	//if (y1=100) then writeln('a ', y2, ' ', (t1*y1 + t2*y2) / (y1 + y2), ' xx ', (t1*miny1 + t2*miny2) / (miny1 + miny2));

  	if (y2 > x2) or (y2<0) then exit
    	else if t*(y1 + y2) <= t1*y1 + t2*y2 then

      if (miny1=-1) or ((t1*y1 + t2*y2) / (y1 + y2) < (t1*miny1 + t2*miny2) / (miny1 + miny2)) then begin
      	miny1:=y1;
        miny2:=y2;
        //writeln(miny1, ' ', miny2);
      end;
  end;
begin
	//assign (input,'input.txt'); reset (input);
  //assign (output,'output.txt'); rewrite (output);
  read (t1,t2,x1,x2,t);
  if (t2 = t1) and (t1 = t) then begin
  	write (x1,' ',x2);
    exit;
  end;
  if t2 = t then begin
  	write (0,' ',x2);
  	exit;
  end;
  if t1 = t then begin
  	write (x1,' ',0);
  	exit;
  end;
  min:=1000001;
  t0 := (t - t1) / (t2 - t);
  {if min > f(0,x2) then begin
    min:= f(0,x2);
    miny1:= 0;
    miny2:=x2;
  end;}
  miny1:=-1;
  for y1:=x1 downto 1 do begin
      y2:= round (y1 * t0);
      check (y1,y2-1);
      check (y1,y2);
      check (y1,y2+1);
  end;
  if miny1 = -1 then if t1 < t2 then begin
    miny1:=0;
  	miny2:=x2;
  end else begin
    miny2:=x2;
    miny1:=x1;
  end;
  write (miny1,' ',miny2);
end.

program pr1;

{$APPTYPE CONSOLE}

{type int64=longint; }
const
 eps=1e-13;  nnn=2000000;
 label 1;
var t1,t2,x1,x2,y1,yy2,t0,nn,ot,mmax,w,t,kol,j,m,k,imax,p,h,jj:int64;
n,s,step2:int64;
i,y2:longint;
blizt:array[0..1000000,-1..3] of double;
minotkl:double; y1bl,ibl,y2bl:longint;

flag,flagggg:boolean;
ott:double;
function min (a,b:longint):longint;begin min:=b;if a<b then min:=a;  end;
function max (a,b:longint):longint;begin max:=b;if a>b then max:=a;  end;

function nod(a,b:longint):longint; var p,t:longint;
begin if (a>0)and(b>0) then
   begin while (b>0) do begin t:=a mod b;a:=b;b:=t;    end;
    p:=a;
   end else if a=0 then p:=b else p:=a;
nod:=p;
end;

function pr(n:longint):boolean; var i,j:longint;flag:boolean;
 begin  flag:=true;
      for i:=2 to n-1 do if n mod i=0 then flag:=false;
   pr:=flag;
 end;

begin
{assign (input,'input.txt');reset(input);
      assign (output,'output.txt'); rewrite(output);
}read(t1,t2,x1,x2,t0);
if (t1=t0)and(t2=t0) then begin  writeln(x1,' ',x2);goto 1;  end;
if (t1=t0)and(t2>t0) then begin  writeln(x1,' ',0);goto 1;  end;
if (t1<t0)and(t2=t0) then begin  writeln(0,' ',x2);goto 1;  end;
  for y2:=0 to x2 do
begin
    yy2:=y2;
  y1:=min(trunc(yy2*(t0-t2)/(t1-t0)),x1); {writeln(y2,' ',y1);  }
   for i:=-1 to 2 do
 begin
   if (y1+i+yy2<>0)and(y1+i<=x1) then blizt[y2,i]:=(t1*(y1+i)+t2*yy2)/(y1+i+yy2)
   else blizt[y2,i]:=100000000;

  end;
end;

{for y2:=0 to x2 do
 begin write(y2,'   '); for i:=-1 to 2 do write(blizt[y2,i]:0:3,' ');writeln;  end;
}

minotkl:=100000000;
 for y2:=x2 downto 0 do for i:=0 to 0 do
   begin   y1:=min(trunc(y2*(t0-t2)/(t1-t0)),x1);
    if ((y1+i)<=x1)and(blizt[y2,i]>=t0-eps)and (abs(blizt[y2,i]-t0)<=minotkl-eps) then
        begin
          y2bl:=y2;
          ibl:=i;minotkl:=abs(blizt[y2,i]-t0) ;
          y1bl:=y1+i;
          {writeln('ttt ',y2,' ',y1); }
        end;

   end;
writeln(y1bl,' ',y2bl);

   1:   close(output);
end.

program pr1;

{$APPTYPE CONSOLE}

{type int64=longint; }
const
 eps=1e-13;  nnn=2000000;
 label 1;
var t1,t2,x1,x2,y1,yy2,t0,nn,ot,mmax,w,t,kol,j,m,k,imax,p,h,jj:int64;
n,s,step2:int64;
i,y2:longint;
blizt:array[0..1000000,-1..3] of double;
minotkl:double; y1bl,ibl,y2bl:longint;

flag,flagggg:boolean;
ott:double;
function min (a,b:longint):longint;begin min:=b;if a<b then min:=a;  end;
function max (a,b:longint):longint;begin max:=b;if a>b then max:=a;  end;

function nod(a,b:longint):longint; var p,t:longint;
begin if (a>0)and(b>0) then
   begin while (b>0) do begin t:=a mod b;a:=b;b:=t;    end;
    p:=a;
   end else if a=0 then p:=b else p:=a;
nod:=p;
end;

function pr(n:longint):boolean; var i,j:longint;flag:boolean;
 begin  flag:=true;
      for i:=2 to n-1 do if n mod i=0 then flag:=false;
   pr:=flag;
 end;

begin
{assign (input,'input.txt');reset(input);
      assign (output,'output.txt'); rewrite(output);
}read(t1,t2,x1,x2,t0);
if (t1=t0)and(t2=t0) then begin  writeln(x1,' ',x2);goto 1;  end;
if (t1=t0)and(t2>t0) then begin  writeln(x1,' ',0);goto 1;  end;
if (t1<t0)and(t2=t0) then begin  writeln(0,' ',x2);goto 1;  end;
  for y2:=0 to x2 do
begin
    yy2:=y2;
  y1:=min(trunc(yy2*(t0-t2)/(t1-t0)),x1); {writeln(y2,' ',y1);  }
   for i:=-1 to 2 do
 begin
   if (y1+i+yy2<>0)and(y1+i<=x1) then blizt[y2,i]:=(t1*(y1+i)+t2*yy2)/(y1+i+yy2)
   else blizt[y2,i]:=100000000;

  end;
end;

{for y2:=0 to x2 do
 begin write(y2,'   '); for i:=-1 to 2 do write(blizt[y2,i]:0:3,' ');writeln;  end;
}

minotkl:=100000000;
 for y2:=x2 downto 0 do for i:=-1 to 2 do
   begin   y1:=min(trunc(y2*(t0-t2)/(t1-t0)),x1);
    if ((y1+i)<=x1)and(blizt[y2,i]>=t0-eps)and (abs(blizt[y2,i]-t0)<=minotkl-eps) then
        begin
          y2bl:=y2;
          ibl:=i;minotkl:=abs(blizt[y2,i]-t0) ;
          y1bl:=y1+i;
          {writeln('ttt ',y2,' ',y1); }
        end;

   end;
writeln(y1bl,' ',y2bl);

   1:   close(output);
end.

Var i,j:longint;
ee,l1,r1,l,r,k,t1,t2,x1,x2,t0:int64;
minRaz:extended;
begin
  Readln(t1,t2,x1,x2,t0);
  l1:=0; r1:=0;
  minRaz:=MaxInt;
  ee:=1;
  if t1=t0
  then ee:=0;
  for i:=ee to x2 do
  begin
    l:=0; r:=x1+1;
    for j:=1 to 30 do
    begin
      k:=(l+r) div 2;
      if k+i=0
      then l:=k
      else if (t1*k+t2*i)/(k+i)>=t0
           then l:=k
           else r:=k;
    end;
    if ((t1*l+t2*i)/(l+i)-t0<minRaz)or(((t1*l+t2*i) / (i+l)-t0=minRaz)and(l+i>L1+r1))
    then begin minraz:=(t1*l+t2*i) / (i+l)-t0; l1:=l; r1:=i; end;
  end;
  writeln(l1,' ',r1);
end.

program Project1;

{$APPTYPE CONSOLE}
{$R+}
{$Q+}

uses
  SysUtils;

const
  inf = int64(2000000000) * int64(2000000000);
var
  t1, t2, t0, x1, x2, i: longint;
  r1, r2, tmp: longint;
  best, t: extended;
  tmp_v: int64;

function f(a1, a2: longint): extended;
begin
  if (a1 = 0) and (a2 = 0) then
    result := inf
  else
    result := (int64(a1) * int64(t1) + int64(a2) * int64(t2)) / (int64(a1) + int64(a2));
end;

begin
  //reset(input, 'input.txt');
  //rewrite(output, 'output.txt');

  read(t1, t2, x1, x2, t0);

  best := inf;
  r1 := -1;
  r2 := -1;

  if (t0 = t1) and (t0 = t2) then
  begin
    writeln(x1, ' ', x2);
    halt(0);
  end;

  if (t0 = t2) then
  begin
    writeln(0, ' ', x2);
    halt(0);
  end;

  for i := 0 to x1 do
  begin

    t := int64(i) * (int64(t0) - int64(t1)) / (int64(t2) - int64(t0));
    if (trunc(t) = t) then
      tmp_v := trunc(t)
    else
      tmp_v := trunc(t) + 1;

    if (tmp_v > x2) then
      tmp := x2
    else
      tmp := tmp_v;

    if (f(i, tmp) < t0) or ((i = 0) and  (tmp = 0)) then
      tmp := -1;

    if (tmp <> -1) and (((best - t0) > (f(i, tmp) - t0)) or
        (((best - t0) = (f(i, tmp) - t0)) and ((r1 + r2) < (i + tmp))))
    then
    begin
      r1 := i;
      r2 := tmp;
      best := f(i, tmp);
    end;
  end;

  if (r1 = -1) and (r2 = -1) then
  begin
    r1 := 0;
    r2 := x2;
  end;

  writeln(r1, ' ', r2);

end.

Uses Math;
var
	i, ai, bi, t1, t2, x1, x2, t, y1, j, y2:  longint;
  gr, ans, res: extended;

begin
	{$ifndef online_judge}
        reset(input, 'a.in');
        rewrite(output, 'a.out');
        {$endif}
        readln(t1, t2, x1, x2, t);
        if (t = t2) then begin
          if (t1 = t2) then write(x1, ' ', x2) else write(0, ' ', x2);
          halt;
        end;
        if (t = t1) then begin
          write(x1, ' ', 0);
          halt;
        end;
        ai := 0; bi := 0; res := -maxlongint; ans := 1e12;
        for i := 0 to x1 do begin
          y1 := i;
          if (t - t2 = 0) then continue;
          for j := -10 to 10 do begin
            y2 := trunc((((t - t1) * int64(y1)) / -(t - t2)) + j);
            if (y1 + y2 <= 0) then continue;
            gr := (int64(t1) * y1 + int64(t2) * y2) / (y1 + y2);
          	if (gr >= t) and ((gr - t < ans) or
            ((gr - t = ans) and (y1 + y2 > res))) and (y2 <= x2) then begin
              ans := gr - t;
          		res := y1 + y2;
          		ai := y1;
          		bi := y2;
            end;
          end;
    	end;
    	write(ai, ' ', bi);
end.

    program slda;
        var t1,t2,x1,x2,t0,y1,y2,z1,z2:int64;
        mi,o:real;
        b:boolean;
        begin
        b:=false;
         readln(t1,t2,x1,x2,t0);
         y1:=X1; Y2:=x2; mi:=maxint;
         while ((y1>=0) and (y2>0)) or ((y1>0) and (y2>=0)) and (b=false) do
         begin
            o:=((t1*y1+t2*y2)/(y1+y2))-t0;
            If o<0 then y1:=y1-1 else
            begin
            if o<mi then
                begin mi:=o; z1:=y1; z2:=y2; end;
            y2:=y2-1;
            end;
            if mi=0 then b:=true;
         end;
         writeln(z1,' ',z2);
        end.

{$O+,Q-,R-,S-}
program taskC;

uses math,sysutils;

var
  y2:longint;t,max:extended;t1,t2,x1,x2,t0,y1,ans1,ans2:int64;

begin
  //assign(input,'input.txt');
  //assign(output,'output.txt');

  read(t1,t2,x1,x2,t0);

  max:=maxlongint;ans1:=0;ans2:=0;

  if (t1=t0) and (t2=t0) then begin
    write(x1,' ',x2);
    halt;
  end;

  if t1=t0 then begin
    write(x1,' ',0);
    halt;
  end;

  if t2=t0 then begin
    write(0,' ',x2);
    halt;
  end;

  for y2:=0 to x2 do
  begin
    y1:=((t0-t2)*y2) div (t1-t0);y1:=min(y1,x1);
    if y2=0 then y1:=x1;

    t:=(t1*y1+t2*y2)/(y1+y2);
    if t<t0 then inc(y1);
    t:=(t1*y1+t2*y2)/(y1+y2);

    if not((y1<=x1) and (y2<=x2) and (y1>=0) and (y2>=0)) then continue;

    if t<max then begin
      ans1:=y1;ans2:=y2;max:=t;
    end
    else if (t-max<1e-20)and(ans1+ans2<y1+y2) then begin
      ans1:=y1;ans2:=y2;
    end;
  end;

  write(ans1,' ',ans2);
end.

program Project5;

{$APPTYPE CONSOLE}

uses
  SysUtils, Math;

type dr = record
  chic, znam: int64;
end;
var
  x1, x2, t1, t2, t0, y1, y2, y1t, y2t: longint;
  y2dr, ttek, tmin: extended;
function nod(a, b: int64): int64;
begin
  if (a = 0) or (b = 0) then
  begin
    nod := a + b;
    exit;
  end;

  nod := nod(b, a mod b);
end;

procedure cokr(var a: dr);
var
  d: int64;
begin
  d := nod(a.chic, a.znam);
  a.chic := a.chic div d;
  a.znam := a.znam div d;
end;

function okrverh(a: dr): int64;
begin
  if a.znam = 1 then
    okrverh := a.chic
  else
    okrverh := (a.chic div a.znam) + 1;
end;

function temp(y1, y2: longint): extended;
var
  res: dr;
begin
  res.chic := int64(y1) * t1 + int64(y2) * t2;
  res.znam := y1 + y2;
//  cokr(res);
  temp := res.chic / res.znam;
end;

function ravn(a, b: dr): boolean;
begin
  if (a.chic = b.chic) and (a.znam = b.znam) then
    ravn := true
  else
    ravn := false;
end;
function bolsh(a, b: dr): boolean;
begin
  if a.chic = -1 then
  begin
    bolsh := true;
    exit;
  end;
  if (a.chic * b.znam - b.chic * a.znam) > 0 then
    bolsh := true
  else
    bolsh := false;
end;
begin
 { assign(input, 'input.txt');
  reset(input);
  assign(output, 'output.txt');
  rewrite(output);      }
  readln(t1, t2, x1, x2, t0);
  if t1 = t2 then
  begin
    writeln(x1, ' ', x2);
    exit;
  end;
  if t0 >= t2 then
  begin
    writeln(0, ' ', x2);
    exit;
  end;

  if t0 <= t1 then
  begin
    writeln(x1, ' ', 0);
    exit;
  end;

  //tmin.chic := -1;
 // tmin.znam := 1;
 tmin :=  1000000000000000000;
  for y1 := 1 to x1 do
  begin
    y2dr := int64(y1) * (t0 - t1) / (t2 - t0);
   // y2dr.znam := t2 - t0;
   // cokr(y2dr);
    y2 := ceil(y2dr);
    //if y2 < 0 then
     // writeln(y2);
    if y2 > x2 then
      break;

    ttek:= temp(y1, y2);
    if (ttek = tmin) and (y1 + y2 > y1t + y2t) then
    begin
      tmin := ttek;
      y1t := y1;
      y2t := y2;
    end;

    if tmin > ttek then
    begin
      tmin := ttek;
      y1t := y1;
      y2t := y2;
    end;
  end;
  if tmin = 1000000000000000000 then
  begin
    writeln(0, ' ', x2);
    exit;
 end;
  writeln(y1t, ' ', y2t);
end.

{$A8,B-,C+,D+,E-,F-,G+,H+,I+,J-,K-,L+,M-,N+,O-,P+,Q+,R+,S+,T-,U-,V+,W-,X+,Y+,Z1}
//{$A8,B-,C+,D-,E-,F-,G+,H+,I-,J-,K-,L+,M-,N+,O+,P+,Q-,R-,S-,T-,U-,V+,W-,X+,Y+,Z1}
{$MINSTACKSIZE $00004000}
{$MAXSTACKSIZE $00100000}

program ProblemC;

{$APPTYPE CONSOLE}

uses
  SysUtils,
  Math;

const
  inname = 'input.txt';
  outname = 'output.txt';
  maxn = 0;
  maxm = 0;
  inf = maxlongint div 2;
  eps = 1e-10;

type
  int = longint;
  bool = boolean;
  real = extended;

var
  t1, t2, x1, x2, t0, y1, y2: int64;

procedure run;
var
  i, j: int64;
begin
  read(t1, t2, x1, x2, t0);

  if (t1 = t0) and (t2 = t0) then begin
    write(x1, ' ', x2);
    exit;
  end;

  if (t1 = t0) then begin
    write(x1, ' ', 0);
    exit;
  end;

  if (t2 = t0) then begin
    write(0, ' ', x2);
    exit;
  end;

  j := 1;

  while j <= x2 do begin
    i := trunc(j*(t2 - t0)/(t0 - t1) + eps);

    i := max(min(i, x1), 0);

    if (j = 1) then begin
      y1 := i;
      y2 := j;

      inc(j);
      continue;
    end;

    if ((t1*y1 + t2*y2)*(i + j) > (t1*i + t2*j)*(y1 + y2)) or
       (((t1*y1 + t2*y2)*(i + j) = (t1*i + t2*j)*(y1 + y2)) and (i + j > y1 + y2)) then begin
      y1 := i;
      y2 := j;
    end;

    inc(j);
  end;

  write(y1, ' ', y2);
end;

procedure openfiles;
begin
  assign(input, inname);
  assign(output, outname);
  reset(input);
  rewrite(output);
end;

procedure closefiles;
begin
  close(input);
  close(output);
end;

Begin
  //openfiles;
  run;
  //closefiles;
End.

program cf126a;
const eps=1e-7;
var
  n,i,j,y1:longint;
  an1,an2,y2,t1,t2,x1,x2,t0,dd:int64;
  ans,d:double;
begin
  readln(t1,t2,x1,x2,t0);
  if t2=t0 then begin
    if t1<>t0 then
    writeln(0,' ',x2)
    else writeln(x1,' ',x2);
    halt;
  end;

  ans:=1e50;
  for y1:=x1 downto 1 do begin
    d:=(t0*y1-t1*y1)/(t2-t0);
    y2:=trunc(d);
    if y2<d-eps then inc(y2);
    if y2<=x2 then begin
      d:=(t1*y1+t2*y2)/(y1+y2);
      if d<ans-eps then begin
        an1:=y1;
        an2:=y2;
        ans:=d;
      end;
    end;
  end;
  if t2<ans-eps then begin
    an1:=0;
    an2:=x2;
  end;

  writeln(an1,' ',an2);
end.

const fi='';
      fo='';
var t1,t2,j,t0,resx,resy:int64;
    i,x1,x2:longint;
    res:extended;
begin
    assign(input,fi);
    reset(input);
    assign(output,fo);
    rewrite(output);
    readln(t1,t2,x1,x2,t0);
    if (t1=t2) and (t2=t0) then
	begin
		writeln(x1,' ',x2);
		halt;
	end;
    if t2=t0 then
        begin
            writeln(0,' ',x2);
            halt;
        end;
    if t1=t0 then
        begin
            writeln(x1,' ',0);
            halt;
        end;
    res:=maxlongint;
    for i:=0 to x1 do
        begin
            if i<>0 then j:=(i*t0-i*t1) div (t2-t0) else j:=x2;
            if (i*t0-i*t1) mod (t2-t0)<>0 then inc(j);
            if (j<=x2) and ((t1*i+t2*j)/(i+j)-t0<=res) then
                begin
                    res:=(t1*i+t2*j)/(i+j)-t0;
                    resx:=i;
                    resy:=j;
                end;
        end;
    writeln(resx,' ',resy);
    close(input);
    close(output);
end.

var t1,t2,x1,x2,t0,k,h,p,y1d,y2d,y1x,y2x:int64;
   i:longint;
    shang:extended;
function min(x,y:int64):int64;
begin
 if x<y then exit(x) else exit(y);
end;
function make(x,y:int64):int64;
var t:int64;
begin
 if x<y then begin t:=x;x:=y;y:=t;end;
 while x mod y<>0 do
  begin
  t:=y;
  y:=x mod y;
  x:=t;
  end;
 exit(y);
end;
begin
 readln(t1,t2,x1,x2,t0);
 if t1=t2 then begin writeln(x1,' ',x2);halt end;
 if t0<=t1 then begin writeln(x1,' ',0);halt end;
 if t0>=t2 then begin writeln(0,' ',x2);halt end;
 h:=make(t2-t0,t0-t1);
 k:=min(x1 div((t2-t0)div h),x2 div((t0-t1)div h)
 );
 if k>0 then
   begin
    writeln(((t2-t0)div h)*k,' ',((t0-t1)div h)*k);
    halt;
   end;
 shang:=(t0-t1)/(t2-t0);
 for i:=x1 downto 1 do
  begin
  p:=trunc(i*shang)+1;
  if p>x2 then p:=x2;
  if p*(t2-t0)>(t0-t1)*i then
   begin
    if y1d=0 then begin y1d:=i;y2d:=p end
     else if p*y1d<i*y2d then begin y1d:=i;y2d:=p end
   end
  end;
 if y1d=0 then writeln(0,' ',x2) else
 writeln(y1d,' ',y2d);
end.

var i,x2,x1,p,pom:longint;
    a,b,t,t1,t2,y1,y2,r1,r2,min,te:real;
begin
  readln(t1,t2,x1,x2,t);
  min:=maxlongint;
  a:=1-t1/t;
  b:=1-t2/t;
  if a<>0 then
  for i:=x2 downto 1 do
   begin
     y2:=i;
     y1:=-y2*b/a;
     p:=trunc(y1);
     if y1<0 then pom:=-1 else pom:=1;
     if abs(y1-p)>0.99999999 then p:=p+pom;
     if (y1<0) and (abs(y1-trunc(y1))<0.00000001) then p:=p-1;
     if p>x1 then p:=x1;
     if y1=p then
      begin
        writeln(p,' ',trunc(y2));
        halt;
      end;
     te:=(t1*p+t2*y2)/(p+y2);
     if te-t<min then
      begin
        min:=te-t;
        r1:=p;
        r2:=y2;
      end;
   end;
  if t1=t then
   begin
     if t1=t2 then writeln(x1,' ',x2) else writeln(x1,' ',0);
     halt;
   end;
  if t2=t then
   begin
     writeln(0,' ',x2);
     halt;
   end;
  writeln(trunc(r1),' ',trunc(r2));
end.

uses math;
var t1,t2:int64;
l,r,c,ay1,ay2,y1,y2,x1,x2:longint;
rr,t0,r1,r2:extended;
  begin
   readln(t1,t2,x1,x2,t0);

   rr:=1000000000000000000.0;

   if (t0=t1)and(t2=t0) then
     begin
      writeln(x1,' ',x2);
      halt(0);
     end;
   if (t0=t1) then
     begin
      writeln(x1,' ',0);
      halt(0);
     end;
   if (t0=t2) then
     begin
      writeln(0,' ',x2);
      halt(0);
     end;

   for y1:=0 to x1 do
     begin
      if y1=0 then
        begin
         rr:=t2;
         ay1:=0;
         ay2:=x2;
         continue;
        end;

      l:=0;
      if y1=0 then l:=1;

      r:=x2;

      while l+1<r do
        begin
         c:=(l+r)div 2;
         r1:=(t1*y1+t2*c)/(y1+c);
         if r1>=t0-0.000000000001 then r:=c else l:=c;
        end;
      r1:=(t1*y1+t2*l)/(y1+l);
      if r1>=t0-0.00000000001 then
        begin
         if abs(r1-rr)<0.0000000001 then
           begin
            if ay1+ay2<y1+l then
              begin
               ay1:=y1;
               ay2:=l;
              end;
           end else

         if r1<rr then
           begin
            rr:=r1;
            ay1:=y1;
            ay2:=l;
           end;
        end;

      r1:=(t1*y1+t2*r)/(y1+r);
      if r1>=t0-0.00000000001 then
        begin
         if abs(r1-rr)<0.0000000001 then
           begin
            if ay1+ay2<y1+r then
              begin
               ay1:=y1;
               ay2:=r;
              end;
           end else
         if r1<rr then
           begin
            rr:=r1;
            ay1:=y1;
            ay2:=r;
           end
        end;
     end;
   writeln(ay1,' ',ay2);
  end.

var t1,t2,t0,m1,m2,x1,x2,i,j:int64;
Begin
 read(t1,t2,x1,x2,t0);
 m1:=0; m2:=0;
 if t0=t2
   then if t0=t1
          then begin
                writeln(x1,' ',x2);
                halt;
               end
          else begin
                writeln(0,' ',x2);
                halt;
               end;
 if t0=t1
   then begin
         writeln(x1,' ',0);
         halt;
        end;
 i:=-1;
 while i<x1 do
  begin
   i:=i+1;
   j:=(t1*i-t0*i) div (t0-t2);
   if (t1*i+t2*j<t0*(i+j)) then j:=j+1;
   if j>x2 then continue;
   if ((t1*i+t2*j)*(m1+m2)=(t1*m1+m2*t2)*(i+j)) and (i+j>m1+m2) or
   ((t1*m1+m2*t2)*(i+j)>(t1*i+t2*j)*(m1+m2))
     then begin
           m1:=i;
           m2:=j;
          end;
  end;
 j:=-1;
 while j<x2 do
  begin
   j:=j+1;
   i:=(t2*j-t0*j) div (t0-t1);
   if ((t1*i+t2*j)<t0*(i+j)) then i:=i+1;
   if i>x1 then continue;
   if ((t1*i+t2*j)*(m1+m2)=(t1*m1+m2*t2)*(i+j)) and (i+j>m1+m2) or
   ((t1*m1+m2*t2)*(i+j)>(t1*i+t2*j)*(m1+m2))
     then begin
           m1:=i;
           m2:=j;
          end;
  end;
 writeln(m1,' ',m2);

End.

var
  t1,t2,x1,x2,t,i,j,r1,r2:int64;

begin
  read(t1,t2,x1,x2,t);
  if (t1=t2)then begin
    writeln(x1,' ',x2);
    exit;
  end;
  if (t=t1)then begin
    writeln(x1,' ',0);
    exit;
  end;
  if (t=t2)then begin
    writeln(0,' ',x2);
    exit;
  end;
  i:=-1;
  r1:=0;r2:=0;
  while (i<x1)do begin
    i:=i+1;
    j:=(i*(t-t1))div(t2-t);
    if (t1*i+t2*j<t*(i+j))then j:=j+1;
    if (j>x2)then continue;
    if (r1=0)and(r2=0)then begin
      r1:=i;r2:=j;
    end else
    if ((t1*i+t2*j)*(r1+r2)<(t1*r1+t2*r2)*(i+j))then begin
      r1:=i;r2:=j;
    end else
    if ((t1*i+t2*j)*(r1+r2)=(t1*r1+t2*r2)*(i+j))and(i+j>r1+r2)then begin
      r1:=i;r2:=j;
    end;
  end;
  j:=-1;
  while (j<x2)do begin
    j:=j+1;
    i:=(j*(t2-t))div(t-t1);
    if (t1*i+t2*j<t*(i+j))then i:=i-1;
    if (i<x1)and(t1*(i+1)+t2*j>=t*((i+1)+j))then i:=i+1;
    if (t1*i+t2*j<t*(i+j))then continue;
    if (i>x1)then continue;
    if (i<0)then continue;
    if (r1=0)and(r2=0)then begin
      r1:=i;r2:=j;
    end else
    if ((t1*i+t2*j)*(r1+r2)<(t1*r1+t2*r2)*(i+j))then begin
      r1:=i;r2:=j;
    end else
    if ((t1*i+t2*j)*(r1+r2)=(t1*r1+t2*r2)*(i+j))and(i+j>r1+r2)then begin
      r1:=i;r2:=j;
    end;
  end;
  writeln(r1,' ',r2);
end.

{$APPTYPE CONSOLE}
{$O+,R-,S-,Q-,I-}
uses
  Math,
  SysUtils;

var t0,t1,t2,x1,x2:int64;
    tm,t1m,y1:int64;
    i:int64;

function ok(a,b,c,d:int64):boolean;
var a1,a2:int64;
begin
    a1:=(t1*a+t2*b)*(c+d);
    a2:=(t1*c+t2*d)*(a+b);
    ok:=(a1<a2)or((a1=a2)and(a+b>c+d));
end;

begin
    readln(t1,t2,x1,x2,t0);
    if (t1=t2) then begin
        writeln(x1,' ',x2);
        halt(0);
    end;
    if (t1 = t0) then
        if (t2<>t0) or ((t2=t0) and (x1>=x2)) then begin
            writeln(x1,' ',0);
            halt(0);
        end;
    if (t2=t0)then
        if(t1<>t0)or((t1=t0)and(x2>=x1))then begin
            writeln(0,' ',x2);
            halt(0);
        end;
    tm:=0;
    t1m:=x2;
    i:=0;
    while(i<=x1)do begin
        y1:=(i*(t0-t1)+t2-t0-1)div(t2-t0);
        if (y1<=x2)and ok(i,y1,tm,t1m) then begin
            tm:=i;
            t1m:=y1;
        end;
        i:=i+1;
    end;
    writeln(tm,' ',t1m);
    halt(0);
end.

var t1, t2, x1, x2, t0: Int64;
    x, t, e, min: Extended;
    i, j, r1, r2, max: Int64;
    o: Longint;
Begin;
    e := 0.000000001;
    read(t1, t2, x1, x2, t0);
    if t2 = t0 then begin
        if t1 = t2 then
            write(x1, ' ' , x2)
        else
            write(0,' ' ,x2);
        halt;
    end;

    min := t2;
    max := x2;
    r1 := 0;
    r2 := x2;

    for o := 1 to x1 do begin
        i := o;
        x := i * (t0 - t1) / (t2 - t0);
        if trunc(x) = x then
            j := trunc(x)
        else
            j := trunc(x) + 1;
        if x < 0 then
            j := 0;
        if (j <= x2) and (j >= 0) then begin
            t := (t1 * i + t2 * j) / (i + j);
        if ((t < min) or ((abs(t - min) < e) and (i + j > max))) and (t >= t0) then begin
            max := i + j;
            r1 := i;
            r2 := j;
            min := t;
        end;
        end;

        j := x2;
        t := (t1 * i + t2 * j) / (i + j);
        if ((t < min) or ((abs(t - min) < e) and (i + j > max))) and (t >= t0) then begin
            max := i + j;
            r1 := i;
            r2 := j;
            min := t;
        end;
    end;

    write(r1,' ' ,r2);
End.

uses math;
var i,yn,ans1,ans2,y1,y2,x1,x2:longint;
    anst,t1,t2,t0,ct:extended;
     begin
     anst:=1000000000000000000;
      readln(t1,t2,x1,x2,t0);
      for y1:=0 to x1 do
       begin
        if t2-t0=0 then yn:=x2 else
        yn:=trunc((y1*(t0-t1))/(t2-t0));
        for i:=-5 to 5 do
         begin
          y2:=yn+i;
          if y2>x2 then continue;
          if y2<0 then continue;
          if (y1+y2)<0.0000001 then continue;
          ct:=(t1*y1+t2*y2)/(y1+y2);
          if (ct>=t0) then
           begin
            if (ct<anst) or ((ct=anst) and (min(y2,y1)>=min(ans1,ans2))) then
             begin
              anst:=ct;
              ans1:=y1;
              ans2:=y2;
             end;
           end;
         end;
       end;
     writeln(ans1,' ',ans2);
    end.

Uses math;
var f,x,z,y21,y22,y23,t1,t2,x1,x2,t,y1,y2,max,o1,o2:extended;
    i,j:longint;
 begin
  read(t1,t2,x1,x2,t);
  f:=maxlongint;
  for i:=0 to trunc(x1) do
   begin
    y1:=i;
    if(t-t2=0)then z:=x2
              else z:=trunc(y1*(t1-t)/(t-t2));
    for j:=-5 to 5 do
     begin
      y2:=z+j;
      if(y2<=x2)and(y1>=0)and(y2>=0)and(y1+y2>0)then
       begin
        x:=(t1*y1+t2*y2)/(y1+y2);
        if(x>=t)and((x-t<f)or((x-t=f)and(y1+y2>max)))then
         begin
          max:=y1+y2;
          o1:=y1;
          o2:=y2;
          f:=x-t;
         end;
       end;
     end;
   end;
  writeln(o1:0:0,' ',o2:0:0);
 end.

var lx,ly,t1,t2,x1,x2,t,i,v,y:int64;
    j:longint;
    lt,min,max:extended;
 begin
  //assign(input,'input.txt');
  //reset(input);
  //assign(output,'output.txt');
  //rewrite(output);
  read(t1,t2,x1,x2,t);
  if (t1=t) and (t2=t) then begin
                             writeln(x1,' ',x2);
                             halt;
                            end;
  if t1=t then begin
                writeln(x1,' ',0);
                halt;
               end
          else
  if t2=t then begin
                writeln(0,' ',x2);
                halt;
               end;
  min:=maxlongint;
  max:=0;
  for j:=0 to x1 do
   begin
    i:=j;
    if i=0 then begin
                 y:=x2;
                 lt:=t2;
                 if lt>=t then

                 if (abs(lt-t)<min) or
                   ((abs(lt-t)=min) and
                    (y>max)) then begin
                                   min:=abs(lt-t);
                                   max:=y;

                                   lx:=0;
                                   ly:=y;
                                  end;
                end
           else begin
                 v:=i*(t1-t);
                 if v mod (t-t2)>0 then begin
                                         y:=v div (t-t2);
                                         if y>x2 then y:=x2
                                                 else
                                         if y<=0 then y:=0;

                                         if i+y> 0 then begin
                                                         lt:=(t1*i+t2*y)/(i+y);

                                                         if lt>=t then

                                                         if (abs(lt-t)<min) or
                                                           ((abs(lt-t)=min) and
                                                            (i+y>max)) then begin
                                                                             min:=abs(lt-t);
                                                                             max:=i+y;

                                                                             lx:=i;
                                                                             ly:=y;
                                                                            end;
                                                        end;

                                         y:=v div (t-t2)+1;
                                         if y>x2 then y:=x2
                                                 else
                                         if y<=0 then y:=0;

                                         if i+y> 0 then begin
                                                         lt:=(t1*i+t2*y)/(i+y);

                                                         if lt>=t then

                                                         if (abs(lt-t)<min) or
                                                           ((abs(lt-t)=min) and
                                                            (i+y>max)) then begin
                                                                             min:=abs(lt-t);
                                                                             max:=i+y;

                                                                             lx:=i;
                                                                             ly:=y;
                                                                            end;
                                                        end;

                                        end
                                   else begin
                                         y:=v div (t-t2);
                                         if y>x2 then y:=x2
                                                 else
                                         if y<=0 then y:=0;

                                         if i+y>0 then begin
                                                        lt:=(t1*i+t2*y)/(i+y);

                                                        if lt>=t then

                                                        if (abs(lt-t)<min) or
                                                          ((abs(lt-t)=min) and
                                                           (i+y>max)) then begin
                                                                            min:=abs(lt-t);
                                                                            max:=i+y;

                                                                            lx:=i;
                                                                            ly:=y;
                                                                           end;
                                                        end;
                                         y:=v div (t-t2)+1;

                                         if y>x2 then y:=x2
                                                 else
                                         if y<=0 then y:=0;

                                         if i+y>0 then begin
                                                        lt:=(t1*i+t2*y)/(i+y);

                                                        if lt>=t then

                                                        if (abs(lt-t)<min) or
                                                          ((abs(lt-t)=min) and
                                                           (i+y>max)) then begin
                                                                            min:=abs(lt-t);
                                                                            max:=i+y;

                                                                            lx:=i;
                                                                            ly:=y;
                                                                           end;
                                                        end;
                                        end;
                end;
   end;

  writeln(lx,' ',ly);
  //close(input);
  //close(output);
 end.

const   finp='';
        fout='';
        eps=1e-10;
var     fi,fo:text;
        t1,t2,x1,x2,t0:longint;
procedure enter;
begin
        assign(fi,finp);reset(fi);
                readln(fi,t1,t2,x1,x2,t0);
        close(fi);
end;
function min(a:int64;b:longint):int64;
begin
        if a < b then exit(a);
        exit(b);
end;
function max(a:int64;b:longint):int64;
begin
        if a < b then exit(b);
        exit(a);
end;
procedure solve;
var     i,j,tmp1,tmp2,y1,y2:int64;
begin
        assign(fo,fout);rewrite(fo);
                if (t1=t0) and (t2=t0) then
                begin
                        writeln(fo,x1,' ',x2);
                        close(fo);
                        exit;
                end;
                if (t1=t0) then
                begin
                        writeln(fo,x1,' ',0);
                        close(fo);
                        exit;
                end;
                if (t2=t0) then
                begin
                        writeln(fo,0,' ',x2);
                        close(fo);
                        exit;
                end;
                j:=1;
                while (j <= x2) do
                begin
                        i:=trunc(j*(t2-t0)/(t0-t1)+eps);
                        i:=max(min(i,x1),0);
                        if j=1 then
                        begin
                                y1:=i;
                                y2:=j;
                                j:=j+1;
                                continue;
                        end;
                        tmp1:=(t1*y1+t2*y2)*(i+j);
                        tmp2:=(t1*i+t2*j)*(y1+y2);
                        if (tmp1 > tmp2) or ((tmp1=tmp2) and (i+j > y1+y2)) then
                        begin
                                y1:=i;
                                y2:=j;
                        end;
                        j:=j+1;
                end;
                writeln(fo,y1,' ',y2);
        close(fo);
end;
begin
        enter;
        solve;
end.

const   finp='';
        fout='';
        eps=1e-10;
var     fi,fo:text;
        t1,t2,x1,x2,t0:int64;
procedure enter;
begin
        assign(fi,finp);reset(fi);
                readln(fi,t1,t2,x1,x2,t0);
        close(fi);
end;
function min(a,b:int64):int64;
begin
        if a < b then exit(a);
        exit(b);
end;
function max(a,b:int64):int64;
begin
        if a < b then exit(b);
        exit(a);
end;
procedure solve;
var     i,j,tmp1,tmp2,y1,y2:int64;
begin
        assign(fo,fout);rewrite(fo);
                if (t1=t0) and (t2=t0) then
                begin
                        writeln(fo,x1,' ',x2);
                        close(fo);
                        exit;
                end;
                if (t1=t0) then
                begin
                        writeln(fo,x1,' ',0);
                        close(fo);
                        exit;
                end;
                if (t2=t0) then
                begin
                        writeln(fo,0,' ',x2);
                        close(fo);
                        exit;
                end;
                j:=1;
                while (j <= x2) do
                begin
                        i:=trunc(j*(t2-t0)/(t0-t1)+eps);
                        i:=max(min(i,x1),0);
                        if j=1 then
                        begin
                                y1:=i;
                                y2:=j;
                                j:=j+1;
                                continue;
                        end;
                        tmp1:=(t1*y1+t2*y2)*(i+j);
                        tmp2:=(t1*i+t2*j)*(y1+y2);
                        if (tmp1 > tmp2) or ((tmp1=tmp2) and (i+j > y1+y2)) then
                        begin
                                y1:=i;
                                y2:=j;
                        end;
                        j:=j+1;
                end;
                writeln(fo,y1,' ',y2);
        close(fo);
end;
begin
        enter;
        solve;
end.

var
 b1,b2,dif:extended;
 t1,t2,x1,x2,tx,x,res:extended;
 i:longint;
begin
 readln(t1,t2,x1,x2,tx);
 dif:=1000*1000*1000;
 if (t1=t2) and (t1=tx) then begin
  writeln(x1:0:0,' ',x2:0:0);
  halt;
 end;
 if t1=tx then begin
  writeln(x1:0:0,' ',0);
  halt;
 end;
 if t2=tx then begin
  writeln(0,' ',x2:0:0);
  halt;
 end;
 x:=x1;
 res:=(t1*x+t2*x2)/(x+x2);
 if (res>=tx) and (x<=x1) and (res-tx<dif) then begin
  b1:=x;
  b2:=x2;
  dif:=res-tx;
 end;
 if (res>=tx) and (x<=x1) and (res-tx=dif) then
  if (x+x2>b1+b2) then begin
   b1:=x;
   b2:=x2;
  end;
 while x2>=0 do begin
  x:=x2*(t2-tx)/(tx-t1);
  x:=trunc(x);
  for i:=-40 to 2 do
   begin
    if (x+i=0) and (x2=0) then
     continue;
    if x+i<0 then
     continue;
    res:=(t1*(x+i)+t2*x2)/(x+i+x2);
    if (res>=tx) and (x+i<=x1) and (res-tx<dif) then begin
     b1:=x+i;
     b2:=x2;
     dif:=res-tx;
    end;
    if (res>=tx) and (x+i<=x1) and (res-tx=dif) then
     if (x+i+x2>b1+b2) then begin
      b1:=x+i;
      b2:=x2;
     end;
   end;
  x2:=x2-1;
 end;
 writeln(b1:0:0,' ',b2:0:0);
end.

var
  sum,x1,x2,t0,t1,t2,x,y,i,j:int64; ans,raz:extended;

function fun(i,j:extended):extended;
begin
  exit((t1*i+t2*j)/(i+j));
end;

procedure dichotomy(i:int64;var j:int64;var raz:extended);
var l,r,m:int64; c1,c2:extended;
begin
  if i=0 then l:=1 else l:=0; r:=x2;
  while (r-l>1) do
  begin
    m:=(l+r) div 2;
    if fun(i,m)>t0 then r:=m else l:=m;
  end;
  if (fun(i,l)>=t0) and (fun(i,r)>=t0) then
  begin
    c1:=abs(fun(i,l)-t0); c2:=abs(fun(i,r)-t0);
    if (c1>=c2)
    then begin j:=r; raz:=fun(i,r); end
    else begin j:=l; raz:=fun(i,l); end;
  end
    else
  begin
    if fun(i,l)>=t0 then begin j:=l; raz:=fun(i,l); end else
    if fun(i,r)>=t0 then begin j:=r; raz:=fun(i,r); end else j:=-1;
  end;

end;

begin

  readln(t1,t2,x1,x2,t0); ans:=1e18; i:=1;
  if (t2>=t0) then begin ans:=t2; sum:=x2; x:=0; y:=x2; end;
  while i<=x1 do
  begin
    dichotomy(i,j,raz);
    if (j<>-1) and ((raz<ans) or ((raz=ans) and (sum<i+j)))
    then
    begin
      ans:=raz; sum:=i+j;
      x:=i; y:=j;
    end;
    inc(i);
  end;
  writeln(x,' ',y);

end.

program shablon;

{$MODE OBJFPC}{$H+}
{$O+ R-  Q-} {$ASSERTIONS ON} {$INLINE ON}
{$COperators ON}

uses
   SysUtils,
   Math;

const inf = 1 / 0;

var ans1, ans2, y1, y2 : longint;
    t1, t2, x1, x2, t0 : int64;
procedure pout;
begin

    {$IFNDEF ONLINE_JUDGE}
    close(input);
    close(output);
    {$ENDIF}
    halt(0);
end;

procedure pinit;
begin
    {$IFNDEF ONLINE_JUDGE}
    assign(input, 'input.txt');
    assign(output, 'output.txt');
    reset(input);
    rewrite(output);
    {$ENDIF}

end;

procedure solve;
var t, tt : extended;
    y, yy : longint;
begin
    read(t1, t2, x1, x2, t0);
    y1 := 0;
    y2 := 0;
    if (t1 = t0) or (t2 = t0) then begin
        if (t1 = t0) then begin
            y1 := x1;
        end;
        if (t2 = t0) then begin
            y2 := x2;
        end;
        writeln(y1, ' ', y2);
        halt(0);
    end;
    y1 := 0;
    y2 := 0;
    t := inf;
    for y := 0 to x1 do begin
        yy := (t0 - t1) * y div (t2 - t0);
        if (t0 - t1) * y mod (t2 - t0) > 0 then begin
            inc(yy);
        end;
        if yy + y = 0 then yy := x2;
        if (yy + y > 0) and (yy <= x2) then begin
            tt := (y * t1 + yy * t2) / (yy + y);
            //tt := (y / (yy + y)) * t1 + (yy/(yy + y)) * t2;
            if tt >= t0 then begin
                if tt = t then begin
                    if (y + yy) > (y1 + y2) then begin
                        y1 := y;
                        y2 := yy;
                        t := tt;
                    end;
                end
                else if tt < t then begin
                    y1 := y;
                    y2 := yy;
                    t := tt;
                end;
            end;
        end;
    end;
    for yy := 0 to x2 do begin
        y := (t2 - t0) * yy div (t0 - t1);
        if (t2 - t0) * yy mod (t0 - t1) > 0 then begin
            inc(y);
        end;
        if yy + y = 0 then y := x1;
        if (y + yy > 0) and (y <= x1) then begin
            tt := (y * t1 + yy * t2) / (yy + y);
 //           tt := (y / (yy + y)) * t1 + (yy/(yy + y)) * t2;
            if (tt >= t0) then begin
                if tt = t then begin
                    if (y + yy) > (y1 + y2) then begin
                        y1 := y;
                        y2 := yy;
                        t := tt;
                    end;
                end
                else if tt < t then begin
                    y1 := y;
                    y2 := yy;
                    t := tt;
                end;
            end;
        end;
    end;
    writeln(y1, ' ', y2);
end;

procedure test;
begin
    ans1 := 28665;
    ans2 := 287957;
    writeln((ans1 * t1 + ans2 * t2) / (ans1 + ans2) :0 :10);
    writeln((y1 * t1 + y2 * t2) / (y1 + y2) :0 :10);
end;

begin
    pinit;
    solve;
   // test;
    pout;
end.

uses math;
var n,m,i,j,t,l,r,yy,zz,ii,jj:longint;
   y1,y2,j1,tt,tt1,t1,t2,x1,x2,t0:int64;
   fl:boolean;
   k,mn:extended;

begin

  read(t1,t2,x1,x2,t0);
  y1:=x1;y2:=x2;mn:=t2;
  while ((y1>=0)and(y2>0) )or ((y1>0)and (y2>=0))  do
   begin
    k:=(t1*y1+t2*y2)/(y1+y2)-t0;
    if k<0 then dec(y1)
           else begin
                 if k<mn then begin
                                  ii:=y1;
                                  jj:=y2;
                                  mn:=k;
                              end;
                dec(y2);
                if k=0 then break;
                end;
   end;
   write(ii,' ',jj);

end.

uses math;
var x1,x2,t1,t2,t0,y1,y2,max1,max2:int64;
tmin, tcur, tmz, tcz,tmp:int64;
i:dword;

begin
tmin:=maxlongint;
readln(t1,t2,x1,x2,t0);
if t1=t2 then
  begin
  writeln(x1, ' ', x2);
  halt(0);
  end
  else
if t1=t0 then
  begin
  writeln(x1, ' 0');
  halt(0);
  end
else if t2=t0 then
  begin
  writeln('0 ', x2);
  halt(0);
  end;
for i:=1 to x1 do
  begin
  y1:=i;
  tmp:=ceil(y1*(t0-t1)/(t2-t0));
  if tmp>x2 then break else y2:=tmp;
  tcur:=t1*y1+t2*y2;
  tcz:=y1+y2;
  //writeln(y1, ' ', y2, ' ', tcur, ' ', tcz, ' ', tmin, ' ', tmz);
  if (tmin=maxlongint) or (tcur*tmz<tmin*tcz) then
  begin
  tmin:=tcur;
  tmz:=tcz;
  max1:=y1;
  max2:=y2;
  end
    else if tcur*tmz=tmin*tcz then
  if y1+y2>max1+max2 then
    begin
    max1:=y1;
    max2:=y2;
    end;
  end;
if max1+max2=0 then
for i:=1 to x2 do
  begin
  y2:=i;
  tmp:=floor(y2*(t2-t0)/(t0-t1));
  if tmp>x1 then break else y1:=tmp;
  tcur:=t1*y1+t2*y2;
  tcz:=y1+y2;
  //writeln(y1, ' ', y2, ' ', tcur, ' ', tcz, ' ', tmin, ' ', tmz);
  if (tmin=maxlongint) or (tcur*tmz<tmin*tcz) then
  begin
  tmin:=tcur;
  tmz:=tcz;
  max1:=y1;
  max2:=y2;
  end
    else if tcur*tmz=tmin*tcz then
  if y1+y2>max1+max2 then
    begin
    max1:=y1;
    max2:=y2;
    end;
  end;
writeln(max1, ' ', max2);
end.

PROGRAM C93;
uses  math;
const esp = 0.00000000001;
var x1, x2, y1, y2, n, t1, t2, t0 : int64;
    res : double;

procedure slove;
var i : longint; j : int64;
begin
   if (t1 = t0) then y1:= x1;
   if (t2 = t0) then y2:= x2;
   if (t1 = t0) or (t2 = t0) then exit;
   res:= maxlongint;
   for i:= 0 to x1 do
      begin
         if i = 0 then j:= x2 else j:= trunc(((t0 - t1) / (t2 - t0)) * i + 0.999999999);
         if (j <= x2) and ((i + j) <> 0) and ((res > (t1 * i + t2 * j) / (i + j) - t0) or (abs(res + t0 -  (t1 * i + t2 * j) / (i + j)) < esp)) then
            begin
               y1:= i;
               y2:= j;
               res:= (t1 * i + t2 * j) / (i + j) - t0
            end;
      end;
end;

BEGIN
   readln(t1, t2, x1, x2, t0);
   slove;
   writeln(y1, ' ', y2);
END.

    const
        fi='';
        fo='';
        oo=1000000000000000;
    var
        f:Text;
        res1,res2,y1,y2,t1,t2,x1,x2,t0:int64;
    procedure nhap;
    begin
       assign(f,fi);
       reset(f);
       readln(f,t1,t2,x1,x2,t0);
       close(f);
   end;
   procedure xuat;
   begin
       assign(f,fo);
       rewrite(f);
       writeln(res1,' ',res2);
       close(f);
   end;
   procedure process;
   var tmin,z:extended;i1,i2:int64;
   begin
       if (t1=t0) and (t2=t0) then
        begin
           res1:=x1;
           res2:=x2;
           exit;
        end;
       if t1=t0 then
        begin
           res1:=x1;
           res2:=0;
           exit;
        end;
       z:=(t0-t2)/(t1-t0);
       if x1>z*x2 then
        begin
           y1:=x2;
           y2:=x2;
        end
       else
        begin
           y1:=x1;
           y2:=x2;
        end;
       res1:=0;
       res2:=0;
       tmin:=oo;
       i2:=y2;
       while i2>=1 do
        begin
           i1:=trunc(i2*(t0-t2)/(t1-t0));
           if i1>x1 then i1:=x1;
           if (t1*i1+t2*i2)/(i1+i2)>=t0 then
            begin
               if abs((t1*i1+t2*i2)/(i1+i2)-tmin)<0.000000001 then
                begin
                   if (i1+i2)>(res1+res2) then
                    begin
                      res1:=i1;
                      res2:=i2;
                    end;
                end
               else
               if (t1*i1+t2*i2)/(i1+i2)<tmin then
                begin
                   tmin:=(t1*i1+t2*i2)/(i1+i2);
                   res1:=i1;
                   res2:=i2;
                end;
            end;
           dec(i2);
        end;
   end;
   begin
       nhap;
       process;
       xuat;
   end.

uses  math;
const esp = 0.00000000001;
var x1, x2, y1, y2, n, t1, t2, t0 : int64;
    res : double;

procedure slove;
var i : longint; j : int64;
begin
   if (t1 = t0) then y1:= x1;
   if (t2 = t0) then y2:= x2;
   if (t1 = t0) or (t2 = t0) then exit;
   res:= maxlongint;
   for i:= 0 to x1 do
      begin
         if i = 0 then
         j:= x2
         else
         j:= trunc(((t0 - t1) / (t2 - t0)) * i + 0.999999999);
         if (j <= x2) and ((i + j) <> 0) and
         ((res > (t1 * i + t2 * j) / (i + j) - t0)
         or (abs(res + t0 -  (t1 * i + t2 * j) / (i + j)) < esp)) then
            begin
               y1:= i;
               y2:= j;
               res:= (t1 * i + t2 * j) / (i + j) - t0
            end;
      end;
end;

BEGIN
   readln(t1, t2, x1, x2, t0);
   slove;
   writeln(y1, ' ', y2);
end.

uses  math;
var  t1,t2,x1,x2,t:longint;
     y1,y2:int64;

procedure th1;
begin
     y1:=x1;
     y2:=x2;
end;

procedure th2;
begin
     y1:=x1;
     y2:=0;
end;

procedure th3;
begin
     y1:=0;
     y2:=x2;
end;

procedure th4;
var  i,j:longint;
     k1,k2:int64;
     s:real;
begin
     k1:=t2-t;
     k2:=t-t1;
     j:=1;
     y1:=0;
     y2:=x2;

     for i:=1 to x1 do
     begin
          while k2*i > k1*j do
          begin
               inc(j);
               if j>x2 then exit;
          end;
          if y1*j <= y2*i then
          begin
               y1:=i;
               y2:=j;
          end;
     end;
end;

begin
     readln(t1,t2,x1,x2,t);
     if (t=t1) and (t=t2) then th1
        else if t=t1 then th2
             else if t=t2 then th3
                  else th4;
     writeln(y1,' ',y2);
     readln;
end.

program hotbath;
const
        fin = '';
        fout = '';
        eps = 0.000001;
var
        t1,t2,t0,x1,x2,y2,y1,sum,max,maxy1,maxy2: int64;
        mt0: real;
procedure readf;
begin
        assign(input, fin); reset(input);
        assign(output, fout); rewrite(output);
        readln(t1,t2,x1,x2,t0);
end;

procedure process;
var
        i: longint;
        tmp1,tmp2: double;
        t,tt: double;
begin
        mt0:=10000000;
        for i:=0 to x1 do
        begin
                y1:=i;
                if t2>t0 then
                begin
                        tmp1:=(t0-t1)*y1;
                        if y1=0 then
                        begin
                                y2:=x2;
                                sum:=y1+y2;
                                tmp1:=t1*y1+t2*y2;
                                tmp2:=y1+y2;
                                tt:=tmp1/tmp2;
                                if (mt0-t0>tt-t0) or ((mt0-t0=tt-t0) and (sum>max)) then
                                begin
                                        max:=sum;
                                        maxy1:=y1;
                                        maxy2:=x2;
                                        mt0:=tt;
                                end;
                                continue;
                        end;
                        tmp2:=t2-t0;
                        t:=tmp1/tmp2;
                        if abs(t-trunc(t))<eps then y2:=trunc(t)
                        else y2:=trunc(t)+1;
                        if y2>x2 then continue;
                        sum:=y1+y2;
                        tmp1:=t1*y1+t2*y2;
                        tmp2:=y1+y2;
                        tt:=tmp1/tmp2;
                        if (mt0-t0>tt-t0) or ((mt0-t0=tt-t0) and (sum>max)) then
                        begin
                                max:=sum;
                                maxy1:=y1;
                                maxy2:=y2;
                                mt0:=tt;
                        end;
                end
                else
                begin
                        if (t0-t1)*y1=0 then
                        begin
                                y2:=x2;
                                sum:=y1+y2;
                                tmp1:=t1*y1+t2*y2;
                                tmp2:=y1+y2;
                                tt:=tmp1/tmp2;
                                if (mt0-t0>tt-t0) or ((mt0-t0=tt-t0) and (sum>max)) then
                                begin
                                        max:=sum;
                                        maxy1:=y1;
                                        maxy2:=y2;
                                        mt0:=tt;
                                end;
                        end;
                end;
        end;
        writeln(maxy1,' ',maxy2);
end;

begin
        readf;
        process;
end.

uses math;
var i,yn,ans1,ans2,y1,y2,x1,x2:longint;
    anst,t1,t2,t0,ct:extended;
     begin
     anst:=1000000000000000000;
      readln(t1,t2,x1,x2,t0);
      for y1:=0 to x1 do
       begin
        if t2-t0=0 then yn:=x2 else
        yn:=trunc((y1*(t0-t1))/(t2-t0));
        for i:=-5 to 5 do
         begin
          y2:=yn+i;
          if y2>x2 then continue;
          if y2<0 then continue;
          if (y1+y2)<0.0000001 then continue;
          ct:=(t1*y1+t2*y2)/(y1+y2);
          if (ct>=t0) then
           begin
            if (ct<anst) or ((ct=anst) and (min(y2,y1)>=min(ans1,ans2))) then
             begin
              anst:=ct;
              ans1:=y1;
              ans2:=y2;
             end;
           end;
         end;
       end;
     writeln(ans1,' ',ans2);
    end.

const
{     fi='hot.inp';
     fo='hot.out';}
     fi='';
     fo='';
     maxn=1;
     eps=1e-9;

var
     f,f2:text;
     a:array[0..maxn]of longint;
     n:longint;
     t1,t2,t0,x1,x2,t:int64;

function maxx(x,y:longint):longint;
begin
     maxx:=x;
     if y>x then maxx:=y;
end;

function minn(x,y:longint):longint;
begin
     minn:=x;
     if y<x then minn:=y;
end;

procedure swap(var x,y:longint);
var  z:longint;
begin
     z:=x;
     x:=y;
     y:=z;
end;

procedure qsort(l,r:longint);
var  tmp,mid,i,j:longint;
begin
     if l>=r then exit;
     i:=l;j:=r;
     mid:=a[(l+r) div 2];
     repeat
          while a[i]<mid do inc(i);
          while a[j]>mid do dec(j);
          if i<=j then
          begin
               swap(a[i],a[j]);
               inc(i);
               dec(j);
          end;
     until i>j;
     qsort(l,j);
     qsort(i,r);
end;

procedure open;
var  i:longint;
begin
     assign(f,fi);reset(f);
     assign(f2,fo);rewrite(f2);
     readln(f, t1, t2, x1, x2 , t0);
     close(f);
end;

procedure main;
var  xopt,yopt,y,max:int64;
     x:longint;
     gt,tt,yy,kq:double;
begin
     if t2=t0 then
     begin
          if t1=t0 then writeln(f2,x1,' ',x2)
          else writeln(f2,0,' ',x2);
          exit;
     end;
     tt:=(t0-t1)/(t2-t0);
     max:=0;
     kq:=1e18;
     for x:=0 to x1 do
     begin
          if x=123 then
               y:=y;
          yy:=x*tt;
          if yy-trunc(yy)<=eps then y:=trunc(yy)
          else y:=trunc(yy)+1;
          if x=0 then
          begin
               y:=t0 div t1;
               if t0 mod t1<>0 then inc(y);
          end;
          y:=minn(y,x2);
          if x+y=0 then continue;
          gt:=(x*t1+y*t2)/(x+y);
          if (gt>=t0) and (abs(gt-t0)<kq) or ((abs(gt-t0-kq)<eps) and (x+y>max)) then
          begin
               kq:=gt-t0;
               max:=x+y;
               xopt:=x;
               yopt:=y;
          end;
     end;

     writeln(f2,xopt,' ',yopt);
end;

procedure open2;
var  test,sotest:integer;
begin
     assign(f,fi);reset(f);
     assign(f2,fo);rewrite(f2);
     readln(f,sotest);
     for test:=1 to sotest do
     begin
          readln(f, t1, t2, x1, x2 , t0);
          main;
     end;
     close(f);
end;

begin
     open;
     main;
     close(f2);
end.

var t0,t1,t2,x1,x2,oti,otf:int64;i,f:longint;otr,vr:extended;
begin
 readln(t1,t2,x1,x2,t0);
 if (t1=t2) then begin writeln(x1,' ',x2);halt(0);end;
 if t1=t0 then begin writeln(x1,' ',0);halt(0);end;
 if t2=t0 then begin writeln(0,' ',x2);halt(0);end;
 otr:=10000000;oti:=0;otf:=0;
 for i:=x1 downto 0 do
 begin
  f:=trunc(-((t0-t1)*i)/(t0-t2));
  if (f<=x2)and(f>=0)and((f<>0)or(i<>0)) then
  begin
   vr:=(t1*i+t2*f)/(i+f);
   if (vr-t0<otr-t0)and(vr>=t0) then begin otr:=vr;oti:=i;otf:=f;end;
  end;
  f:=f+1;
  if (f<=x2)and(f>=0)and((f<>0)or(i<>0)) then
  begin
   vr:=(t1*i+t2*f)/(i+f);
   if (vr-t0<otr-t0)and(vr>=t0) then begin otr:=vr;oti:=i;otf:=f;end;
  end;
  f:=f-2;
  if (f<=x2)and(f>=0)and((f<>0)or(i<>0)) then
  begin
   vr:=(t1*i+t2*f)/(i+f);
   if (vr-t0<otr-t0)and(vr>=t0) then begin otr:=vr;oti:=i;otf:=f;end;
  end;
 end;
 if oti=0 then otf:=x2;
 if otf=0 then oti:=x1;
 writeln(oti,' ',otf);
end.

Uses math;
var f,x,z,y21,y22,y23,t1,t2,x1,x2,t,y1,y2,max,o1,o2:extended;
    i,j:longint;
 begin
  read(t1,t2,x1,x2,t);
  f:=maxlongint;
  for i:=0 to trunc(x1) do
   begin
    y1:=i;
    if(t-t2=0)then z:=x2
              else z:=trunc(y1*(t1-t)/(t-t2));
    for j:=-5 to 5 do
     begin
      y2:=z+j;
      if(y2<=x2)and(y1>=0)and(y2>=0)and(y1+y2>0)then
       begin
        x:=(t1*y1+t2*y2)/(y1+y2);
        if(x>=t)and((x-t<f)or((x-t=f)and(y1+y2>max)))then
         begin
          max:=y1+y2;
          o1:=y1;
          o2:=y2;
          f:=x-t;
         end;
       end;
     end;
   end;
  writeln(o1:0:0,' ',o2:0:0);
 end.

{$Mode ObjFPC}
const fi='';
      fo='';
      nmax=1000000;
var t0,i,j,cs,csc:longint;
    x,y,t1,t2,x1,x2:qword;
    min:real;
begin
    assign(input,fi); reset(input);
    assign(output,fo); rewrite(output);
    read(t1,t2,x1,x2,t0);
    x:=t2-t0;
    y:=t0-t1;
    if (x=0) or (y=0) then
        begin
            if x=0 then
                begin
                    if y<>0 then write('0 ',x2)
                    else write(x1,' ',x2);
                end
            else write(x1,' 0');
        end
    else
        begin
            min:=1e32;
            cs:=0;
            for i:=x2 downto 1 do
                begin
                    j:=trunc((i*x)/y);
                    if j>x1 then j:=x1;
                    if (i+j<>0) and (j<=x1) and ((t1*j+t2*i)/(i+j)-t0>=0) and ((t1*j+t2*i)/(i+j)-t0<min) then
                        begin
                            cs:=i;
                            csc:=j;
                            min:=(t1*j+t2*i)/(i+j)-t0;
                        end;
                    if (j+1<=x1) and ((t1*(j+1)+t2*i)/(i+j+1)-t0>=0) and ((t1*(j+1)+t2*i)/(i+j+1)-t0<min) then
                        begin
                            cs:=i;
                            csc:=j+1;
                            min:=(t1*(j+1)+t2*i)/(i+j+1)-t0;
                        end;
                end;
            write(csc,' ',cs);
        end;
    close(input);
    close(output);
end.

var
 b1,b2,dif:extended;
 t1,t2,x1,x2,tx,x,res:extended;
 i:longint;
begin
 readln(t1,t2,x1,x2,tx);
 dif:=1000*1000*1000;
 if (t1=t2) and (t1=tx) then begin
  writeln(x1:0:0,' ',x2:0:0);
  halt;
 end;
 if t1=tx then begin
  writeln(x1:0:0,' ',0);
  halt;
 end;
 if t2=tx then begin
  writeln(0,' ',x2:0:0);
  halt;
 end;
 x:=x1;
 res:=(t1*x+t2*x2)/(x+x2);
 if (res>=tx) and (x<=x1) and (res-tx<dif) then begin
  b1:=x;
  b2:=x2;
  dif:=res-tx;
 end;
 if (res>=tx) and (x<=x1) and (res-tx=dif) then
  if (x+x2>b1+b2) then begin
   b1:=x;
   b2:=x2;
  end;
 while x2>=0 do begin
  x:=x2*(t2-tx)/(tx-t1);
  x:=trunc(x);
  for i:=-40 to 2 do
   begin
    if (x+i=0) and (x2=0) then
     continue;
    if x+i<0 then
     continue;
    res:=(t1*(x+i)+t2*x2)/(x+i+x2);
    if (res>=tx) and (x+i<=x1) and (res-tx<dif) then begin
     b1:=x+i;
     b2:=x2;
     dif:=res-tx;
    end;
    if (res>=tx) and (x+i<=x1) and (res-tx=dif) then
     if (x+i+x2>b1+b2) then begin
      b1:=x+i;
      b2:=x2;
     end;
   end;
  x2:=x2-1;
 end;
 writeln(b1:0:0,' ',b2:0:0);
end.

program Project3_1;

{$APPTYPE CONSOLE}

const
  eps = 0.0000000001;

var
  t1, t2, x1, x2, t0, l1, l2, r1, r2, m1, m2, max, ans1, ans2, y1, y2, y3: int64;
  i: longint;
  t, min: extended;

begin
  {assignfile(input, 'input.txt');
  reset(input);
  assignfile(output, 'output.txt');
  rewrite(output);      }

  read(t1, t2, x1, x2, t0);

  min := -1;
  max := -1;

  for i := 0 to x1 do begin
    y1 := i;
    if t0 = t2 then
      y2 := x2
    else
      y2 := trunc((y1 * (t0 - t1)) / (t2 - t0));
      y3 := y2 + 1;
    if y2 <= x2 then begin
      if y1 + y2 = 0 then
        t := 0
      else
        t := (t1 * y1 + t2 * y2) / (y1 + y2);
      if t - t0 >= 0 then begin
        if ((abs(t - t0) < min - eps) or (min = -1)) then begin
          ans1 := y1;
          ans2 := y2;
          max := y1 + y2;
          min := abs(t - t0);
        end else if (abs(t - t0) <= min + eps) and (y1 + y2 > max) then begin
          ans1 := y1;
          ans2 := y2;
          max := y1 + y2;
          min := abs(t - t0);
        end;
      end;
    end;

    y2 := y3;
     if y2 <= x2 then begin
      if y1 + y2 = 0 then
        t := 0
      else
        t := (t1 * y1 + t2 * y2) / (y1 + y2);
      if t - t0 >= 0 then begin
        if ((abs(t - t0) < min - eps) or (min = -1)) then begin
          ans1 := y1;
          ans2 := y2;
          max := y1 + y2;
          min := abs(t - t0);
        end else if (abs(t - t0) <= min + eps) and (y1 + y2 > max) then begin
          ans1 := y1;
          ans2 := y2;
          max := y1 + y2;
          min := abs(t - t0);
        end;
      end;
    end;
  end;

   for i := 0 to x2 do begin
    y2 := i;
    if t0 = t1 then
      y1 := x1
    else
      y1 := trunc((y2 * (t2 - t0)) / (t0 - t1));
      y3 := y1 + 1;
    if y1 <= x1 then begin
      if y1 + y2 = 0 then
        t := 0
      else
        t := (t1 * y1 + t2 * y2) / (y1 + y2);
      if t - t0 >= 0 then begin
        if ((abs(t - t0) < min - eps) or (min = -1)) then begin
          ans1 := y1;
          ans2 := y2;
          max := y1 + y2;
          min := abs(t - t0);
        end else if (abs(t - t0) <= min + eps) and (y1 + y2 > max) then begin
          ans1 := y1;
          ans2 := y2;
          max := y1 + y2;
          min := abs(t - t0);
        end;
      end;
    end;

    y1 := y3;
     if y1 <= x1 then begin
      if y1 + y2 = 0 then
        t := 0
      else
        t := (t1 * y1 + t2 * y2) / (y1 + y2);
      if t - t0 >= 0 then begin
        if ((abs(t - t0) < min - eps) or (min = -1)) then begin
          ans1 := y1;
          ans2 := y2;
          max := y1 + y2;
          min := abs(t - t0);
        end else if (abs(t - t0) <= min + eps) and (y1 + y2 > max) then begin
          ans1 := y1;
          ans2 := y2;
          max := y1 + y2;
          min := abs(t - t0);
        end;
      end;
    end;
  end;

  write(ans1, ' ', ans2);

  //read(ans1);

  closefile(input);
  closefile(output);
end.

program task_1;
{$apptype console r+ q+ o+}
uses SysUtils, Math;
type real = extended;
var y1,y2,t1,t2,x1,x2,t0: int64;
    anst: real;
procedure binary;
var m,ll,rr,mm: int64;
    tp: real;
begin
  m:=0;
  while (m<=x1)do begin
    ll:=0;rr:=x2;
    while (ll<=rr)do begin
      mm:=(ll+rr)shr 1;
      if (m=0)and(mm=0)then break;
      tp:=(t1*m+t2*mm)/(m+mm);
      if (tp>=t0)and
        ((tp<anst)or((tp=anst)and(m+mm>y1+y2)))then begin
          y1:=m;
          y2:=mm;
          anst:=tp;
        end;
      if (tp>t0)then rr:=mm-1
        else ll:=mm+1;
    end;
    inc(m);
  end;
end;

begin
//assign(input,'input.txt');reset(input);
//assign(output,'output.txt');rewrite(output);
  read(t1,t2,x1,x2,t0);
  y1:=0;
  y2:=0;
  anst:=1e9;
  binary;
  if (y1=0)then y2:=x2;
  if (y2=0)then y1:=x1;
  write(y1,' ',y2);
end.

program Project1;

{$APPTYPE CONSOLE}
{$R+}
{$Q+}

uses
  SysUtils;

const
  inf = int64(2000000000) * int64(2000000000);
var
  t1, t2, t0, x1, x2, i: longint;
  r1, r2, tmp: longint;
  best: extended;

function f(a1, a2: longint): extended;
begin
  if (a1 = 0) and (a2 = 0) then
    result := inf
  else
    result := (a1 * t1 + a2 * t2) / (a1 + a2);
end;

function binfind(x: longint): longint;
var
  l, r: longint;
  m: extended;
begin
  l := -1;
  r := x2;
  while (l + 1 < r) do
  begin
    m := f(x, (l + r) div 2);
    if (m < t0) and (m < inf) then
      l := (l + r) div 2
    else
      r := (l + r) div 2;
  end;

  if (f(x, r) < t0) then
    result := -1
  else
    result := r;
end;

begin
  //reset(input, 'input.txt');
  //rewrite(output, 'output.txt');

  read(t1, t2, x1, x2, t0);

  best := inf;
  r1 := -1;
  r2 := -1;

  for i := 0 to x1 do
  begin
    tmp := binfind(i);
    if (tmp <> -1) and (((best - t0) > (f(i, tmp) - t0)) or
        (((best - t0) = (f(i, tmp) - t0)) and ((r1 + r2) < (i + tmp))
    )) then
    begin
      r1 := i;
      r2 := tmp;
      best := f(i, tmp);
    end;
  end;

  writeln(r1, ' ', r2);

end.

const
        fi='';
        fo='';
var
        tmin:real;
        t1,t2,x1,x2,t0,max,r1,r2,y1,y2:int64;
procedure init;
begin
        assign(input,fi);
        assign(output,fo);
        reset(input);
        rewrite(output);
        readln(t1,t2,x1,x2,t0);
        tmin:=maxlongint;
end;

procedure bs;
var
        a,b,l,r,mid:int64;
        tmp:real;
        r1:longint;
begin
        for r1:=0 to x1 do
        begin
                a:=t1*int64(r1);
                l:=0;           r:=2*x2;
                repeat
                        mid:=(l+r)div 2;
                        if(r1+mid)=0 then
                        begin
                                if t1>=t0 then
                                begin
                                        if(t1<tmin)or((t1=tmin)and
                                        (max<x1))then
                                        begin
                                                max:=x1;
                                                tmin:=t1;
                                                y1:=x1;
                                                y2:=mid;

                                        end;
                                        r:=mid-1;
                                end
                                else
                                        l:=mid+1;
                                if l>r then break;
                                continue;
                        end
                        else
                                tmp:=(a+t2*mid)/(r1+mid);
                        if tmp>=t0 then
                        begin
                                if(tmp<tmin)or((tmp=tmin)and(max<r1+mid))then
                                        begin
                                                max:=r1+mid;
                                                tmin:=tmp;
                                                y1:=r1;
                                                y2:=mid;
                                        end;
                                r:=mid-1;
                        end
                        else
                                l:=mid+1;
                until l>r;
        end;
        writeln(y1,' ',y2);
end;

begin
        init;
        bs;
end.

var y1: integer;
    te,min,t1,t2,t0,x1,x2,y2,y01,y02: int64;
    dt: real;
begin
 readln(t1,t2,x1,x2,t0);
 min:=-1;
 dt:=100000;

 if t0<=t1 then writeln(x1,' 0') else if t0>=t2 then writeln('0 ',x2) else begin

  for y1:=0 to x1 do begin
   te:=round(int(y1*(t0-t1)/(t2-t0)+0.99999));
   if (te=0)and(t2-t0<dt)and(t2-t0>=0) then  dt:=t2-t0;
   if (te<>0)and(te<=x2)and((t1*y1+t2*te)/(te+y1)-t0>-0.001) and ((t1*y1+t2*te)/(te+y1)-t0<dt) then
    dt:=(t1*y1+t2*te)/(te+y1)-t0;
  end;

  for y1:=0 to x1 do begin
   te:=round(int(y1*(t0-t1)/(t2-t0)+0.99999));
   if (te=0)and(y1=0) then te:=x2;
   if (te=0) and(abs(t2-t0-dt)<=0.0001)and(te+y1>=min) then begin
    min:=te+y1;
    y01:=y1;
    y02:=te;
   end;
    if (te<>0)and(abs((t1*y1+t2*te)/(te+y1)-t0-dt)<=0.0001)and(te<=x2)and(te+y1>min) then begin
    min:=te+y1;
    y01:=y1;
    y02:=te;
   end;
  end;

 end;
 writeln(y01,' ',y02);
 readln;
end.

program cf126a;
const eps=1e-7;
var
  n,i,j,y1:longint;
  an1,an2,y2,t1,t2,x1,x2,t0,dd:int64;
  ans,d:double;
begin
  readln(t1,t2,x1,x2,t0);
  if t2=t0 then begin
    writeln(0,' ',x2);
  end;

  ans:=1e50;
  for y1:=x1 downto 1 do begin
    d:=(t0*y1-t1*y1)/(t2-t0);
    y2:=trunc(d);
    if y2<d-eps then inc(y2);
    if y2<=x2 then begin
      d:=(t1*y1+t2*y2)/(y1+y2);
      if d<ans-eps then begin
        an1:=y1;
        an2:=y2;
        ans:=d;
      end;
    end;
  end;
  if t2<d-eps then begin
    an1:=0;
    an2:=x2;
  end;

  writeln(an1,' ',an2);
end.

program Project1;

{$APPTYPE CONSOLE}
{$R+}
{$Q+}

uses
  SysUtils;

const
  inf = int64(2000000000) * int64(2000000000);
var
  t1, t2, t0, x1, x2, i: longint;
  r1, r2, tmp: longint;
  best, t: extended;
  tmp_v: int64;

function f(a1, a2: longint): extended;
begin
  if (a1 = 0) and (a2 = 0) then
    result := inf
  else
    result := (a1 * t1 + a2 * t2) / (a1 + a2);
end;

begin
  //reset(input, 'input.txt');
  //rewrite(output, 'output.txt');

  read(t1, t2, x1, x2, t0);

  best := inf;
  r1 := -1;
  r2 := -1;

  if (t0 = t1) and (t0 = t2) then
  begin
    writeln(x1, ' ', x2);
    halt(0);
  end;

  if (t0 = t1) then
  begin
    writeln(x1, ' ', 0);
    halt(0);
  end;

  if (t0 = t2) then
  begin
    writeln(0, ' ', x2);
    halt(0);
  end;

  for i := 0 to x1 do
  begin

    t := i * (t0 - t1) / (t2 - t0);
    if (trunc(t) = t) then
      tmp_v := trunc(t)
    else
      tmp_v := trunc(i * (t0 - t1) / (t2 - t0)) + 1;

    if (tmp_v >= 0) and (tmp_v <= x2) then
      tmp := tmp_v
    else
      tmp := -1;

    if (tmp <> -1) and (((best - t0) > (f(i, tmp) - t0)) or
        (((best - t0) = (f(i, tmp) - t0)) and ((r1 + r2) < (i + tmp))
    ) or (best = inf)) then
    begin
      r1 := i;
      r2 := tmp;
      best := f(i, tmp);
    end;
  end;

  writeln(r1, ' ', r2);

end.

var  i:longint;
     x1,x2,t1,t2,t:int64;
     tt,t1m,t2m:int64;
     mnt,nt:real;

     begin
 readln(t1,t2,x1,x2,t);

 mnt:=-10000000;
 if (t=t2) and (t=t1) then
  begin

    writeln(x1,' ',x2);
    halt;
  end;
   if t<>t1 then
   begin
    for i:=x2 downto 0 do
     begin
       if (i*(t2-t)/(t-t1)<>trunc(i*(t2-t)/(t-t1))) then
         tt:= trunc(i*(t2-t)/(t-t1))+1 else
          tt:=trunc(i*(t2-t)/(t-t1));
         if (tt+i=0) or (tt<0) then continue;
         if tt>x1 then continue;
         nt:=((t1*tt)+(t2*i))/(tt+i);
         if((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or
    ((nt>=t) and (abs(abs(nt-t)-abs(mnt-t))=0) and ((i+tt)>=t1m+t2m)) then
     begin
      t1m:=tt;
      t2m:=i;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;

     tt:=tt+1;
     if (tt+i=0) or (tt<0) then continue;
    if tt>x2 then continue;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or
    ((nt>=t) and (abs(abs(nt-t)-abs(mnt-t))=0) and ((i+tt)>=t1m+t2m)) then
     begin
      t1m:=tt;
      t2m:=i;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;

     tt:=tt+1;
     if (tt+i=0) or (tt<0) then continue;
    if tt>x2 then continue;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or
    ((nt>=t) and (abs(abs(nt-t)-abs(mnt-t))=0) and ((i+tt)>=t1m+t2m)) then
     begin
      t1m:=tt;
      t2m:=i;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
    end;
     end;
  if t2<>t then
  begin

 for i:=x1 downto 0 do
  begin
    if (i*(t-t1)/(t2-t))<>i*(t-t1)/(t2-t) then tt:=trunc(i*(t-t1)/(t2-t))+1
     else tt:=trunc(i*(t-t1)/(t2-t));
    if (tt+i=0) or (tt<0) then continue;
    if tt>x2 then continue;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or
    ((nt>=t) and (abs(abs(nt-t)-abs(mnt-t))=0) and ((i+tt)>=t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
     tt:=tt+1;
     if (tt+i=0) or (tt<0) then continue;
    if tt>x2 then continue;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or
    ((nt>=t) and (abs(abs(nt-t)-abs(mnt-t))=0) and ((i+tt)>=t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
     tt:=tt+1;
     if (tt+i=0) or (tt<0) then continue;
    if tt>x2 then continue;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or
    ((nt>=t) and (abs(abs(nt-t)-abs(mnt-t))=0) and ((i+tt)>=t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
  end;

   end;

   writeln(t1m,' ',t2m);
end.

const
        fi='';
var
        f:text;
        t1,t2,x1,x2,t0,ra1,ra2:longint;
        tmp:real;
procedure nhap;
begin
        assign(f,fi);
        reset(f);
        readln(f,t1,t2,x1,x2,t0);
        close(f);
end;
procedure xuly;
var
        u,v,x,q:real;
        i,k:longint;
begin
        if t1=t2 then
        begin
                ra1:=x1; ra2:=x2;
                exit;
        end;
        if t2=t0 then
        begin
                ra1:=0; ra2:=x2;
                exit;
        end;
        u:=(t0-t1)/(t2-t0);
        tmp:=1000000000;
        for i:=1 to x1 do
        begin
                v:=i*u;
                q:=v;
                v:=trunc(v);
                if v<=x2 then
                begin
                        k:=trunc(v);
                        x:=(t1*i+t2*k)/(k+i);
                        if x>=t0 then
                        begin
                        if x<tmp then
                        begin
                                ra1:=i;
                                ra2:=k;
                                tmp:=x;
                        end
                        else
                        if x=tmp then
                        begin
                                if (i+k)>(ra1+ra2) then
                                begin
                                        ra1:=i;
                                        ra2:=k;
                                end;
                        end;
                        end;
                end;
                if q>trunc(q) then
                begin
                v:=trunc(q)+1;
                if v<=x2 then
                begin
                        k:=trunc(v);
                        x:=(t1*i+t2*k)/(k+i);
                        if x<t0 then continue;
                        if x<tmp then
                        begin
                                ra1:=i;
                                ra2:=k;
                                tmp:=x;
                        end
                        else
                        if x=tmp then
                        begin
                                if (i+k)>(ra1+ra2) then
                                begin
                                        ra1:=i;
                                        ra2:=k;
                                end;
                        end;
                end;
                end;
        end;
end;
begin
        nhap;
        xuly;
        writeln(ra1,' ',ra2);
end.

{$O-}
Uses Math;
const eps = 1e-9;
var
	x1, x2, ans, y2, y1, res, i, n, ai, bi, l, r, m: longint;
        t1, t2, t, otv, gr: extended;

begin
	{$ifndef online_judge}
        reset(input, 'a.in');
        rewrite(output, 'a.out');
        {$endif}
        readln(t1, t2, x1, x2, t);
        otv := 1e12;
        res := -maxlongint;
        ai := 0; bi := 0;
        for i := x1 downto 0 do begin
        	y1 := i;
        	l := 0; r := x2; ans := 0;
        	while (l <= r) do begin
        		m := (l + r) shr 1;
            		if (y1 + m = 0) then gr := 0 else
        		gr := (t1 * y1 + t2 * m) / (y1 + m);
        		if gr >= t then begin
        			ans := 1;
        			y2 := m;
        	      	end;
        		if gr < t then l := m + 1 else r := m - 1;
            	end;
            	if (ans > 0) then gr := (t1 * y1 + t2 * y2) / (y1 + y2);
            	if (ans > 0) and ((otv - abs(gr - t) > 0) or ((abs(gr - t - otv) < eps) and (y1 + y2 > res))) then begin
            		otv := abs(gr - t);
            		res := y1 + y2;
            		ai := y1;
            		bi := y2;
             	end;
   	end;
   	writeln(ai, ' ', bi);
end.

{$O+,Q-,R-,S-}
program taskC;

uses math,sysutils;

var
  y2:longint;t,max:extended;t1,t2,x1,x2,t0,y1,ans1,ans2:int64;

begin
  //assign(input,'input.txt');
  //assign(output,'output.txt');

  read(t1,t2,x1,x2,t0);

  max:=maxlongint;ans1:=0;ans2:=0;

  if (t1=t0) and (t2=t0) then begin
    write(x1,' ',x2);
    halt;
  end;

  if t1=t0 then begin
    write(x1,' ',0);
    halt;
  end;

  if t2=t0 then begin
    write(0,' ',x2);
  end;

  for y2:=0 to x2 do
  begin
    y1:=((t0-t2)*y2) div (t1-t0);
    if y2=0 then y1:=x1;

    t:=(t1*y1+t2*y2)/(y1+y2);
    if t<t0 then inc(y1);
    t:=(t1*y1+t2*y2)/(y1+y2);

    if t<max then begin
      ans1:=y1;ans2:=y2;max:=t;
    end
    else if (t-max<1e-20)and(ans1+ans2<y1+y2) then begin
      ans1:=y1;ans2:=y2;
    end;
  end;

  write(ans1,' ',ans2);
end.

{$Mode ObjFPC}
const fi='';
      fo='';
      nmax=1000000;
var t1,t2,t0,x1,x2,i,j,x,y,cs,csc:longint;
    min:real;
begin
    assign(input,fi); reset(input);
    assign(output,fo); rewrite(output);
    read(t1,t2,x1,x2,t0);
    x:=t2-t0;
    y:=t0-t1;
    if x*y=0 then
        begin
            if x=0 then write('0 ',x2)
            else write(x1,' 0');
        end
    else
        begin
            min:=1e32;
            cs:=0;
            for i:=x2 downto 0 do
                begin
                    j:=trunc((i*x)/y);
                    if (i+j<>0) and (j<=x1) and ((t1*j+t2*i)/(i+j)-t0>=0) and ((t1*j+t2*i)/(i+j)-t0<min) then
                        begin
                            cs:=i;
                            csc:=j;
                            min:=(t1*j+t2*i)/(i+j)-t0;
                        end;
                    if (j+1<=x1) and ((t1*(j+1)+t2*i)/(i+j+1)-t0>=0) and ((t1*(j+1)+t2*i)/(i+j+1)-t0<min) then
                        begin
                            cs:=i;
                            csc:=j+1;
                            min:=(t1*(j+1)+t2*i)/(i+j+1)-t0;
                        end;
                end;
            write(csc,' ',cs);
        end;
    close(input);
    close(output);
end.

Var ee,l1,r1,l,r,k,t1,t2,x1,x2,t0,i,j:longint;
minRaz:extended;
begin
 // Assign(Input,'input.txt');
//  Assign(Output,'output.txt');
  Readln(t1,t2,x1,x2,t0);
  l1:=0; r1:=0;
  minRaz:=MaxInt;
  ee:=1;
  if t1=t0
  then ee:=0;
  for i:=ee to x2 do
  begin
    l:=0; r:=x1+1;
    for j:=1 to 30 do
    begin
      k:=(l+r) div 2;
      if k+i=0
      then l:=k
      else if (t1*k+t2*i)/(k+i)>=t0
           then l:=k
           else r:=k;
    end;
    if ((t1*l+t2*i)/(l+i)-t0<minRaz)or(((t1*l+t2*i) / (i+l)-t0=minRaz)and(l+i>L1+r1))
    then begin minraz:=(t1*l+t2*i) / (i+l)-t0; l1:=l; r1:=i; end;
  end;
  writeln(l1,' ',r1);
end.

program pr1;

{$APPTYPE CONSOLE}

{type int64=longint; }
const
 eps=1e-10;  nnn=2000000;
 label 1;
var t1,t2,x1,x2,y1,y2,t0,nn,ot,mmax,w,t,kol,i,j,m,k,imax,p,h,jj:longint;
n,s,step2:int64;
blizt:array[0..2000000,-1..2] of double;
minotkl:double; y1bl,ibl,y2bl:longint;

flag,flagggg:boolean;
ott:double;
function min (a,b:longint):longint;begin min:=b;if a<b then min:=a;  end;
function max (a,b:longint):longint;begin max:=b;if a>b then max:=a;  end;

function nod(a,b:longint):longint; var p,t:longint;
begin if (a>0)and(b>0) then
   begin while (b>0) do begin t:=a mod b;a:=b;b:=t;    end;
    p:=a;
   end else if a=0 then p:=b else p:=a;
nod:=p;
end;

function pr(n:longint):boolean; var i,j:longint;flag:boolean;
 begin  flag:=true;
      for i:=2 to n-1 do if n mod i=0 then flag:=false;
   pr:=flag;
 end;

begin
{assign (input,'input.txt');reset(input);
      assign (output,'output.txt'); rewrite(output);
}read(t1,t2,x1,x2,t0);
if (t1=t0)and(t2=t0) then begin  writeln(x1,' ',x2);goto 1;  end;
if (t1=t0)and(t2>t0) then begin  writeln(x1,' ',0);goto 1;  end;
if (t1<t0)and(t2=t0) then begin  writeln(0,' ',x2);goto 1;  end;
  for y2:=0 to x2 do
begin
  y1:=trunc(y2*(t0-t2)/(t1-t0)); {writeln(y2,' ',y1); }
   for i:=-1 to 2 do
   if (y1+i+y2<>0)and(y1+i<x1) then blizt[y2,i]:=(t1*(y1+i)+t2*y2)/(y1+i+y2)
   else blizt[y2,i]:=100000000000;
end;

{ for y2:=0 to x2 do
 begin write(y2,'   '); for i:=-1 to 2 do write(blizt[y2,i]:0:3,' ');writeln;  end;
}

minotkl:=100000000;
 for y2:=0 to x2 do for i:=-1 to 2 do
   begin   y1:=trunc(y2*(t0-t2)/(t1-t0));
    if ((y1+i)<=x1)and(blizt[y2,i]>=t0-eps)and (abs(blizt[y2,i]-t0)<=minotkl+eps) then
        begin
          y2bl:=y2;
          ibl:=i;minotkl:=abs(blizt[y2,i]-t0) ;
          y1bl:=y1+i;
          {writeln('ttt ',y2,' ',y1); }
        end;

   end;
writeln(y1bl,' ',y2bl);

   1:   close(output);
end.

var n,m,i,j,t,l,r,yy,zz,ii,jj:longint;
   j1,tt,tt1,t1,t2,x1,x2,t0:longint;

   k,min:extended;
procedure prov(j1:longint);
begin
  k:=(t1*i+t2*j1)/(i+j1);
  k:=k-t0;
  if k<0 then exit;
   if k<=min then begin
                     ii:=i;
                     jj:=j1;
                     min:=k;
                  end;

end;

begin

  read(t1,t2,x1,x2,t0);
  tt:=t2-t0;
  tt1:=t0-t1;
  min:=t2;
  if tt1=0 then begin
                write( x1,' 0');
                halt;
               end;
  if tt=0 then begin
                write( '0 ',x2);
                halt;
               end;
   for i:=1 to x1 do
    begin
       j:=trunc(tt1/tt*i);
       if (j>x2)or(j<=0) then continue;
       prov(j);
       prov(j+1);

    end;

   write(ii,' ',jj);

end.

program Project1;

{$APPTYPE CONSOLE}
{$R+}
{$Q+}

uses
  SysUtils;

const
  inf = int64(2000000000) * int64(2000000000);
var
  t1, t2, t0, x1, x2, i: longint;
  r1, r2, tmp: longint;
  best, t: extended;
  tmp_v: int64;

function f(a1, a2: longint): extended;
begin
  if (a1 = 0) and (a2 = 0) then
    result := inf
  else
    result := (a1 * t1 + a2 * t2) / (a1 + a2);
end;

begin
  //reset(input, 'input.txt');
  //rewrite(output, 'output.txt');

  read(t1, t2, x1, x2, t0);

  best := inf;
  r1 := -1;
  r2 := -1;

  if (t0 = t1) and (t0 = t2) then
  begin
    writeln(x1, ' ', x2);
    halt(0);
  end;

  if (t0 = t2) then
  begin
    writeln(0, ' ', x2);
    halt(0);
  end;

  for i := 0 to x1 do
  begin

    t := i * (t0 - t1) / (t2 - t0);
    if (trunc(t) = t) then
      tmp_v := trunc(t)
    else
      tmp_v := trunc(i * (t0 - t1) / (t2 - t0)) + 1;

    if (tmp_v >= 0) and (tmp_v <= x2) then
      tmp := tmp_v
    else
      tmp := -1;

    if (tmp <> -1) and (((best - t0) > (f(i, tmp) - t0)) or
        (((best - t0) = (f(i, tmp) - t0)) and ((r1 + r2) < (i + tmp))
    ) or (best = inf)) then
    begin
      r1 := i;
      r2 := tmp;
      best := f(i, tmp);
    end;
  end;

  writeln(r1, ' ', r2);

end.

var
  t1,t2,x1,x2,t0,minx,minf,f,min,x : longint;
  px,tx,mint,fx : extended;
  ok : boolean;

  function _round(x : extended) : longint;
  begin
    _round:=round(x);
  end;

begin
  {assign(input,'input.txt'); reset(input);
  assign(output,'output.txt'); rewrite(output);}
  readln(t1,t2,x1,x2,t0);
  min:=-maxlongint;
  mint:=maxlongint;
  if (t1=t0) and (t2=t0)
    then
      if (x1>=x2) then begin minx:=x1; minf:=0; end
                 else begin minx:=0; minf:=x2; end
    else begin
      if (t1=t0) then begin minx:=x1; minf:=0; end;
      if (t2=t0) then begin minx:=0; minf:=x2; end;
    end;
  if (t1<>t0) and (t2<>t0) then begin
  for x:=1 to x1 do begin
    px:=(t0*x-t1*x)/(t2-t0);
    if (px<=x2) and (px>=0)
      then begin
        f:=_round(px);
        tx:=(t1*x+t2*f)/(x+f);
        fx:=tx-t0;
        if (fx<=mint) and (fx>=0)  then
          if (x+f>min) or ((fx<mint) and (fx>=0)) then begin
             minx:=x; minf:=f; min:=x+f; mint:=fx;
          end;
      end;
  end;
  end;
  writeln(minx,' ',minf);
  close(input); close(output);
end.

const
        fi='';
var
        f:text;
        t1,t2,x1,x2,t0,ra1,ra2:longint;
        tmp:real;
procedure nhap;
begin
        assign(f,fi);
        reset(f);
        readln(f,t1,t2,x1,x2,t0);
        close(f);
end;
procedure xuly;
var
        u,x,q,v:real;
        i:longint;
        dm1,dm2,dm3,k:int64;
begin
        if t1=t2 then
        begin
                ra1:=x1; ra2:=x2;
                exit;
        end;
        if t2=t0 then
        begin
                ra1:=0; ra2:=x2;
                exit;
        end;
        u:=(t0-t1)/(t2-t0);
        tmp:=1000000000;
        for i:=1 to x1 do
        begin
                v:=i*u;
                q:=v;
                v:=trunc(v);
                if v<=x2 then
                begin
                        k:=trunc(v);
                        dm1:=int64(t1*i);
                        dm2:=int64(t2*k);
                        dm3:=int64(k+i);
                        x:=(dm1+dm2)/dm3;
                        if x>=t0 then
                        begin
                        if x<tmp then
                        begin
                                ra1:=i;
                                ra2:=k;
                                tmp:=x;
                        end
                        else
                        if x=tmp then
                        begin
                                if (i+k)>(ra1+ra2) then
                                begin
                                        ra1:=i;
                                        ra2:=k;
                                end;
                        end;
                        end;
                end;
                if q+0.5>trunc(q) then
                begin
                v:=trunc(q)+1;
                if v<=x2 then
                begin
                        k:=trunc(v);
                        dm1:=int64(t1*i);
                        dm2:=int64(t2*k);
                        dm3:=int64(k+i);
                        x:=(dm1+dm2)/dm3;
                        if x<t0 then continue;
                        if x<tmp then
                        begin
                                ra1:=i;
                                ra2:=k;
                                tmp:=x;
                        end
                        else
                        if x=tmp then
                        begin
                                if (i+k)>(ra1+ra2) then
                                begin
                                        ra1:=i;
                                        ra2:=k;
                                end;
                        end;
                end;
                end;
        end;
end;
begin
        nhap;
        xuly;
        writeln(ra1,' ',ra2);
end.

const
    fi='';
    fo='';
    oo=1000000000000000;
var
    f:Text;
    res1,res2,y1,y2,t1,t2,x1,x2,t0:int64;
procedure nhap;
begin
    assign(f,fi);
    reset(f);
    readln(f,t1,t2,x1,x2,t0);
    close(f);
end;
procedure xuat;
begin
    assign(f,fo);
    rewrite(f);
    writeln(res1,' ',res2);
    close(f);
end;
procedure process;
var z,tmin:real;i1,i2:int64;
begin
    if (t1=t0) and (t2=t0) then
     begin
        res1:=x1;
        res2:=x2;
        exit;
     end;
    if t1=t0 then
     begin
        res1:=x1;
        res2:=0;
        exit;
     end;
    z:=(t0-t2)/(t1-t0);
    if x1>z*x2 then
     begin
        y1:=x2;
        y2:=x2;
     end
    else
     begin
        y1:=x1;
        y2:=x2;
     end;
    res1:=0;
    res2:=0;
    tmin:=oo;
    i2:=y2;
    while i2>=1 do
     begin
        i1:=trunc(i2*z);
        if i1<=x1 then
        if (t1*i1+t2*i2)/(i1+i2)>=t0 then
         begin
            if abs((t1*i1+t2*i2)/(i1+i2)-tmin)<0.0000001 then
             begin
                if (i1+i2)>(res1+res2) then
                 begin
                   res1:=i1;
                   res2:=i2;
                 end;
             end
            else
            if (t1*i1+t2*i2)/(i1+i2)<tmin then
             begin
                tmin:=(t1*i1+t2*i2)/(i1+i2);
                res1:=i1;
                res2:=i2;
             end;
         end;
        dec(i2);
     end;
end;
begin
    nhap;
    process;
    xuat;
end.

var
 b1,b2,dif:extended;
 t1,t2,x1,x2,tx,x,res:extended;
 i:longint;
 swap:boolean;
begin
 readln(t1,t2,x1,x2,tx);
 if x1>x2 then begin
  dif:=x1;
  x1:=x2;
  x2:=dif;
  dif:=t1;
  t1:=t2;
  t2:=dif;
  swap:=true;
 end;
 dif:=1000*1000*1000;
 if (t1=t2) and (t1=tx) then begin
  writeln(x1:0:0,' ',x2:0:0);
  halt;
 end;
 if t1=tx then begin
  writeln(x1:0:0,' ',0);
  halt;
 end;
 if t2=tx then begin
  writeln(0,' ',x2:0:0);
  halt;
 end;
 x:=x1;
 res:=(t1*x+t2*x2)/(x+x2);
 if (res>=tx) and (x<=x1) and (res-tx<dif) then begin
  b1:=x;
  b2:=x2;
  dif:=res-tx;
 end;
 if (res>=tx) and (x<=x1) and (res-tx=dif) then
  if (x+x2>b1+b2) then begin
   b1:=x;
   b2:=x2;
  end;
 while x2>=0 do begin
  x:=x2*(t2-tx)/(tx-t1);
  x:=trunc(x);
  for i:=-40 to 2 do
   begin
    if (x+i=0) and (x2=0) then
     continue;
    if x+i<0 then
     continue;
    res:=(t1*(x+i)+t2*x2)/(x+i+x2);
    if (res>=tx) and (x+i<=x1) and (res-tx<dif) then begin
     b1:=x+i;
     b2:=x2;
     dif:=res-tx;
    end;
    if (res>=tx) and (x+i<=x1) and (res-tx=dif) then
     if (x+i+x2>b1+b2) then begin
      b1:=x+i;
      b2:=x2;
     end;
   end;
  x2:=x2-1;
 end;
 if swap then
  writeln(b2:0:0,' ',b1:0:0)
 else
  writeln(b1:0:0,' ',b2:0:0);
end.

const
        fi='';
var
        f:text;
        t1,t2,x1,x2,t0,ra1,ra2:longint;
        tmp:real;
procedure nhap;
begin
        assign(f,fi);
        reset(f);
        readln(f,t1,t2,x1,x2,t0);
        close(f);
end;
procedure xuly;
var
        u,x,q,v:real;
        i:longint;
        dm1,dm2,dm3,k:int64;
begin
        if t1=t2 then
        begin
                ra1:=x1; ra2:=x2;
                exit;
        end;
        if t2=t0 then
        begin
                ra1:=0; ra2:=x2;
                exit;
        end;
        u:=(t0-t1)/(t2-t0);
        tmp:=1000000000;
        for i:=1 to x1 do
        begin
                v:=i*u;
                q:=v;
                v:=trunc(v);
                if v<=x2 then
                begin
                        k:=trunc(v);
                        dm1:=int64(t1*i);
                        dm2:=int64(t2*k);
                        dm3:=int64(k+i);
                        x:=(dm1+dm2)/dm3;
                        if x>=t0 then
                        begin
                        if x<tmp then
                        begin
                                ra1:=i;
                                ra2:=k;
                                tmp:=x;
                        end
                        else
                        if x=tmp then
                        begin
                                if (i+k)>(ra1+ra2) then
                                begin
                                        ra1:=i;
                                        ra2:=k;
                                end;
                        end;
                        end;
                end;
                if q>trunc(q) then
                begin
                v:=trunc(q)+1;
                if v<=x2 then
                begin
                        k:=trunc(v);
                        dm1:=int64(t1*i);
                        dm2:=int64(t2*k);
                        dm3:=int64(k+i);
                        x:=(dm1+dm2)/dm3;
                        if x<t0 then continue;
                        if x<tmp then
                        begin
                                ra1:=i;
                                ra2:=k;
                                tmp:=x;
                        end
                        else
                        if x=tmp then
                        begin
                                if (i+k)>(ra1+ra2) then
                                begin
                                        ra1:=i;
                                        ra2:=k;
                                end;
                        end;
                end;
                end;
        end;
end;
begin
        nhap;
        xuly;
        writeln(ra1,' ',ra2);
end.

{$R+,Q+,I+}
{$apptype console}
Uses SysUtils;
Const
   e=0.0000001;
Var
   t1,t2,x1,x2,t0,t,j:Int64;
   i1,j1,i:Integer;
   r,s,t3:Real;
Begin
   Read(t1,t2,x1,x2,t0);
   If (t1=t2) and (t2=t0) Then Begin
      If x1=x2 Then Write(x1,' ',x2)
      Else If x1>x2 Then Write(x1,' ',0)
      Else Write(0,' ',x2);
      Halt;
   End;
   If t0=t1 Then Begin
      If (t0=t2) and (x2>x1) Then Write(0,' ',x2)
                             Else Write(x1,' ',0);
      Halt;
   End;
   If t0=t2 Then Begin
      Write(0,' ',x2);
      Halt;
   End;
   r:=High(Integer);
   t:=High(Integer);
   i1:=0;
   j1:=0;
   For i:=0 To x1 Do Begin
      s:=i*(t1-t0)/(t0-t2);
      j:=Round(s);
      If j<s Then j:=j+1;
      If j>x2 Then j:=x2;
      If j<0 Then j:=0;
      If (i=0) and (j=0) Then Continue;
      t3:=(t1*i+t2*j)/(i+j);
      If t3>=t0 Then Begin
         If (abs(t3-t0-r)<e) and (i+j>t) Then Begin
            t:=i+j;
            i1:=i;
            j1:=j;
         End
         Else If t3-t0<r Then Begin
            r:=t3-t0;
            t:=i+j;
            i1:=i;
            j1:=j;
         End;
      End;
   End;
   If (i1<>0) and (j1<>0) Then Write(i1,' ',j1)
   Else Begin
      If (t1=t0) and (x1>x2) Then Write(x1,' ',0)
                             Else Write(0,' ',x2);
   End;
End.

var
  t1,t2,x1,x2,t0,minx,minf,f,min,x : longint;
  px,tx,mint,fx : extended;
  ok : boolean;

  function _round(x : extended) : longint;
  begin
    _round:=trunc(x);
  end;

begin
 { assign(input,'input.txt'); reset(input);
  assign(output,'output.txt'); rewrite(output);}
  readln(t1,t2,x1,x2,t0);
  min:=-maxlongint;
  mint:=maxlongint;
  if (t1=t0) and (t2=t0)
    then
      if (x1>=x2) then begin minx:=x1; minf:=0; end
                 else begin minx:=0; minf:=x2; end
    else begin
      if (t1=t0) then begin minx:=x1; minf:=0; end;
      if (t2=t0) then begin minx:=0; minf:=x2; end;
    end;
  if (t1<>t0) and (t2<>t0) then begin
  for x:=1 to x1 do begin
    px:=(t0*x-t1*x)/(t2-t0);
    if (px<=x2) and (px>=0)
      then begin
        f:=_round(px);
        tx:=(t1*x+t2*f)/(x+f);
        fx:=tx-t0;
        if (fx<=mint) and (fx>=0)  then
          if (x+f>min) or ((fx<mint) and (fx>=0)) then begin
             minx:=x; minf:=f; min:=x+f; mint:=fx;
          end;
      end;
  end;
  end;
  writeln(minx,' ',minf);
  close(input); close(output);
end.

var t1,t2,t0,max1,max2:int64;
    i,j,x1,x2:longint;
Begin
 read(t1,t2,x1,x2,t0);
 max1:=0; max2:=0;
 if t0=t2
   then if t0=t1
          then begin
                writeln(x1,' ',x2);
                halt;
               end
          else begin
                writeln(0,' ',x2);
                halt;
               end;
 if t0=t1
   then begin
         writeln(x1,' ',0);
         halt;
        end;

 for i:=0 to x1 do
  begin
   j:=(t1*i-t0*i) div (t0-t2);
   if (i=0) and (j=0) then j:=1;
   while (t1*i+t2*j<t0*(i+j)) and (j<=x2) do j:=j+1;
   if j>x2 then continue;
   if ((t1*i+t2*j)*(max1+max2)=(t1*max1+max2*t2)*(i+j)) and (i+j>max1+max2) or
   ((t1*max1+max2*t2)*(i+j)>t1*i+t2*j) and (t1*i+t2*j>t0*(i+j))
     then begin
           max1:=i;
           max2:=j;
          end;
  end;
 for j:=0 to x2 do
  begin
   i:=(t2*j-t0*j) div (t0-t1);
   if (i=0) and (j=0) then i:=1;
   while ((t1*i+t2*j)<t0*(i+j)) and (i<=x1) do i:=i+1;
   if i>x2 then continue;
   if ((t1*i+t2*j)*(max1+max2)=(t1*max1+max2*t2)*(i+j)) and (i+j>max1+max2) or
   ((t1*max1+max2*t2)*(i+j)>t1*i+t2*j) and (t1*i+t2*j>t0*(i+j))
     then begin
           max1:=i;
           max2:=j;
          end;
  end;
 writeln(max1,' ',max2);

End.

const   fi='';
        fo='';
var     t1,t2,x1,x2,t0,y1,y2:longint;
procedure       rinf;
begin
        assign(input,fi);
        reset(input);
        read(t1,t2,x1,x2,t0);
        close(input);
end;

procedure       solve;
var     i,k:longint;
        s,t:real;
begin
        if t0=t1 then
          begin
                y1:=x1;
                y2:=0;
                exit;
          end;
        if t0=t2 then
          begin
                y1:=0;
                y2:=x2;
                exit;
          end;
        if t1=t2 then
          begin
                y1:=x1;
                y2:=x2;
                exit;
          end;
        s:=maxlongint;
        for i:=0 to x1 do
          begin
                if int64((t0-t1))*int64(i) mod int64((t2-t0))=0 then
                  k:=int64((t0-t1))*int64(i) div int64((t2-t0))
                else
                  k:=int64((t0-t1))*int64(i) div int64((t2-t0))+1;
                if i+k<>0 then
                t:=(t1*i+t2*k)/(i+k)
                else t:=maxlongint;
                if s>t then
                  begin
                        s:=t;
                        y1:=i;
                        y2:=k;
                  end
                else
                  if (s=t)and(y1+y2<i+k) then
                    begin
                        y1:=i;
                        y2:=k;
                    end;
          end;
end;

procedure       winf;
begin
        assign(output,fo);
        rewrite(output);
        write(y1,' ',y2);
        close(output);
end;

begin
        rinf;
        solve;
        winf;
end.

uses math;
var i,yn,ans1,ans2,y1,y2,x1,x2:longint;
    anst,t1,t2,t0,ct:extended;
     begin
     anst:=1000000000000000000;
      readln(t1,t2,x1,x2,t0);
      for y1:=0 to x1 do
       begin
        if t2-t0=0 then yn:=x2 else
        yn:=trunc((y1*(t0-t1))/(t2-t0));
        for i:=-2 to 2 do
         begin
          y2:=yn+i;
          if y2>x2 then continue;
          if y2<0 then continue;
          if (y1+y2)<0.0000001 then continue;
          ct:=(t1*y1+t2*y2)/(y1+y2);
          if (ct>=t0) then
           begin
            if (ct<anst) or ((ct=anst) and (min(y2,y1)>=min(ans1,ans2))) then
             begin
              anst:=ct;
              ans1:=y1;
              ans2:=y2;
             end;
           end;
         end;
       end;
     writeln(ans1,' ',ans2);
    end.

var
 b1,b2,dif:extended;
 t1,t2,x1,x2,tx,x,res:extended;
 i:longint;
begin
 readln(t1,t2,x1,x2,tx);
 dif:=1e10;
 if (t1=t2) and (t1=tx) then begin
  writeln(x1:0:0,' ',x2:0:0);
  halt;
 end;
 if t1=tx then begin
  writeln(x1:0:0,' ',0);
  halt;
 end;
 if t2=tx then begin
  writeln(0,' ',x2:0:0);
  halt;
 end;
 while x2>=0 do begin
  x:=x2*(t2-tx)/(tx-t1);
  x:=trunc(x);
  for i:=-40 to 2 do
   begin
    if (x+i=0) and (x2=0) then
     continue;
    if x+i<0 then
     continue;
    res:=(t1*(x+i)+t2*x2)/(x+i+x2);
    if (res>=tx) and (x+i<=x1) and (res-tx<dif) then begin
     b1:=x+i;
     b2:=x2;
     dif:=res-tx;
    end;
    if (res>=tx) and (x+i<=x1) and (res-tx=dif) then
     if (x+i+x2>b1+b2) then begin
      b1:=x+i;
      b2:=x2;
     end;
   end;
  x2:=x2-1;
 end;
 writeln(b1:0:0,' ',b2:0:0);
end.

const
    fi='';
    fo='';
    oo=1000000000000000;
var
    f:Text;
    res1,res2,y1,y2,t1,t2,x1,x2,t0:int64;
procedure nhap;
begin
    assign(f,fi);
    reset(f);
    readln(f,t1,t2,x1,x2,t0);
    close(f);
end;
procedure xuat;
begin
    assign(f,fo);
    rewrite(f);
    writeln(res1,' ',res2);
    close(f);
end;
procedure process;
var z,tmin:real;i1,i2:int64;
begin
    if (t1=t0) and (t2=t0) then
     begin
        res1:=x1;
        res2:=x2;
        exit;
     end;
    if t1=t0 then
     begin
        res1:=x1;
        res2:=0;
        exit;
     end;
    z:=(t0-t2)/(t1-t0);
    if x1>z*x2 then
     begin
        y1:=x2;
        y2:=x2;
     end
    else
     begin
        y1:=x1;
        y2:=x2;
     end;
    res1:=0;
    res2:=0;
    tmin:=oo;
    i2:=y2;
    while i2>=1 do
     begin
        i1:=round(i2*z);
        if i1<=x1 then
        if (t1*i1+t2*i2)/(i1+i2)>=t0 then
         begin
            if abs((t1*i1+t2*i2)/(i1+i2)-tmin)<0.0000001 then
             begin
                if (i1+i2)>(res1+res2) then
                 begin
                   res1:=i1;
                   res2:=i2;
                 end;
             end
            else
            if (t1*i1+t2*i2)/(i1+i2)<tmin then
             begin
                tmin:=(t1*i1+t2*i2)/(i1+i2);
                res1:=i1;
                res2:=i2;
             end;
         end;
        dec(i2);
     end;
end;
begin
    nhap;
    process;
    xuat;
end.

var
  t1,t2,x1,x2,t0,minx,minf,f,min : int64;
  x : longint;
  px,tx,mint,fx : extended;
  ok : boolean;

  function _round(x : extended) : longint;
  begin
    _round:=round(x);
  end;

begin
{  assign(input,'input.txt'); reset(input);
  assign(output,'output.txt'); rewrite(output);}
  readln(t1,t2,x1,x2,t0);
  min:=-maxlongint;
  mint:=maxlongint;
  if (t1=t0) and (t2=t0)
    then
      if (x1>=x2) then begin ok:=true; minx:=x1; minf:=0; end
                 else begin ok:=true; minx:=0; minf:=x2; end
    else begin
      if (t1=t0) then begin ok:=true; minx:=x1; minf:=0; end;
      if (t2=t0) then begin ok:=true; minx:=0; minf:=x2; end;
    end;
  if (t1<>t0) and (t2<>t0) then begin
  ok:=false;
  for x:=1 to x1 do begin
    px:=(t0*x-t1*x)/(t2-t0);
    if (px<=x2) and (px>=0)
      then begin
        f:=_round(px);
        tx:=(t1*x+t2*f)/(x+f);
        fx:=tx-t0;
        if (fx<=mint) and (fx>=0)  then
          if (x+f>min) or ((fx<mint) and (fx>=0)) then begin
             minx:=x; minf:=f; min:=x+f; mint:=fx;
             ok:=true;
          end;
      end;
  end;
  end;
  if (not ok) then minf:=x2;
  writeln(minx,' ',minf);
  close(input); close(output);
end.

var  i:longint;
     x1,x2,t1,t2,t:int64;
     tt,t1m,t2m:longint;
     mnt,nt:real;
begin
 readln(t1,t2,x1,x2,t);

 if t=t2 then
  begin
    writeln(0,' ',x2);
    halt;
  end;

 for i:=x1 downto 0 do
  begin
    tt:=round(i*(t-t1)/(t2-t));
    if tt+i=0 then continue;
    if tt>x2 then tt:=x2;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or ((nt>=t) and (abs(nt-t)=abs(mnt-t)) and ((i+tt)>t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
  end;

writeln(t1m,' ',t2m);
end.

const fi='';
      fo='';
var t1,t2,j,t0,resx,resy:int64;
    i,x1,x2:longint;
    res:extended;
begin
    assign(input,fi);
    reset(input);
    assign(output,fo);
    rewrite(output);
    readln(t1,t2,x1,x2,t0);
    if t2=t0 then
        begin
            writeln(0,' ',x2);
            halt;
        end;
    if t1=t0 then
        begin
            writeln(x1,' ',0);
            halt;
        end;
    res:=maxlongint;
    for i:=0 to x1 do
        begin
            if i<>0 then j:=(i*t0-i*t1) div (t2-t0) else j:=x2;
            if (i*t0-i*t1) mod (t2-t0)<>0 then inc(j);
            if (j<=x2) and ((t1*i+t2*j)/(i+j)-t0<=res) then
                begin
                    res:=(t1*i+t2*j)/(i+j)-t0;
                    resx:=i;
                    resy:=j;
                end;
        end;
    writeln(resx,' ',resy);
    close(input);
    close(output);
end.

uses math;
var x1,x2,t1,t2,t0,y1,y2,i,j,max1,max2:dword;
tmin, tcur, tmz, tcz:longint;

begin
tmin:=maxlongint;
readln(t1,t2,x1,x2,t0);
if t1=t2 then
  begin
  writeln(x1, ' ', x2);
  halt(0);
  end
  else
if t1=t0 then
  begin
  writeln(x1, ' 0');
  halt(0);
  end
else if t2=t0 then
  begin
  writeln('0 ', x2);
  halt(0);
  end;
for y1:=1 to x1 do
  begin
  y2:=ceil(y1*(t0-t1)/(t2-t0));
  if y2>x2 then break;
  tcur:=t1*y1+t2*y2;
  tcz:=y1+y2;
  //writeln(y1, ' ', y2, ' ', tcur, ' ', tcz, ' ', tmin, ' ', tmz);
  if (tmin=maxlongint) or (tcur*tmz<tmin*tcz) then
  begin
  tmin:=tcur;
  tmz:=tcz;
  max1:=y1;
  max2:=y2;
  end
    else if tcur*tmz=tmin*tcz then
  if y1+y2>max1+max2 then
    begin
    max1:=y1;
    max2:=y2;
    end;
  end;
if max1+max2=0 then
for y2:=1 to x2 do
  begin
  y1:=floor(y2*(t2-t0)/(t0-t1));
  if y1>x1 then break;
  tcur:=t1*y1+t2*y2;
  tcz:=y1+y2;
  //writeln(y1, ' ', y2, ' ', tcur, ' ', tcz, ' ', tmin, ' ', tmz);
  if (tmin=maxlongint) or (tcur*tmz<tmin*tcz) then
  begin
  tmin:=tcur;
  tmz:=tcz;
  max1:=y1;
  max2:=y2;
  end
    else if tcur*tmz=tmin*tcz then
  if y1+y2>max1+max2 then
    begin
    max1:=y1;
    max2:=y2;
    end;
  end;
writeln(max1, ' ', max2);
end.

program pr1;

{$APPTYPE CONSOLE}

{type int64=longint; }
const
 eps=1e-13;  nnn=2000000;
 label 1;
var t1,t2,x1,x2,y1,yy2,t0,nn,ot,mmax,w,t,kol,j,m,k,imax,p,h,jj:int64;
n,s,step2:int64;
i,y2:longint;
blizt:array[0..2000000,-2..3] of double;
minotkl:double; y1bl,ibl,y2bl:longint;

flag,flagggg:boolean;
ott:double;
function min (a,b:longint):longint;begin min:=b;if a<b then min:=a;  end;
function max (a,b:longint):longint;begin max:=b;if a>b then max:=a;  end;

function nod(a,b:longint):longint; var p,t:longint;
begin if (a>0)and(b>0) then
   begin while (b>0) do begin t:=a mod b;a:=b;b:=t;    end;
    p:=a;
   end else if a=0 then p:=b else p:=a;
nod:=p;
end;

function pr(n:longint):boolean; var i,j:longint;flag:boolean;
 begin  flag:=true;
      for i:=2 to n-1 do if n mod i=0 then flag:=false;
   pr:=flag;
 end;

begin
{assign (input,'input.txt');reset(input);
      assign (output,'output.txt'); rewrite(output);
}read(t1,t2,x1,x2,t0);
if (t1=t0)and(t2=t0) then begin  writeln(x1,' ',x2);goto 1;  end;
if (t1=t0)and(t2>t0) then begin  writeln(x1,' ',0);goto 1;  end;
{if (t1<t0)and(t2=t0) then begin  writeln(0,' ',x2);goto 1;  end;
}  for y2:=0 to x2 do
begin
    yy2:=y2;
  y1:=trunc(yy2*(t0-t2)/(t1-t0)); {writeln(y2,' ',y1); }
   for i:=-1 to 2 do
   if (y1+i+yy2<>0)and(y1+i<=x1) then blizt[y2,i]:=(t1*(y1+i)+t2*yy2)/(y1+i+yy2)
   else blizt[y2,i]:=100000000000;
end;

{for y2:=0 to x2 do
 begin write(y2,'   '); for i:=-1 to 2 do write(blizt[y2,i]:0:3,' ');writeln;  end;
}

minotkl:=100000000;
 for y2:=x2 downto 0 do for i:=-1 to 2 do
   begin   y1:=trunc(y2*(t0-t2)/(t1-t0));
    if ((y1+i)<=x1)and(blizt[y2,i]>=t0-eps)and (abs(blizt[y2,i]-t0)<=minotkl-eps) then
        begin
          y2bl:=y2;
          ibl:=i;minotkl:=abs(blizt[y2,i]-t0) ;
          y1bl:=y1+i;
          {writeln('ttt ',y2,' ',y1); }
        end;

   end;
writeln(y1bl,' ',y2bl);

   1:   close(output);
end.

const
{     fi='hot.inp';
     fo='hot.out';}
     fi='';
     fo='';
     maxn=1;
     eps=1e-9;

var
     f:text;
     a:array[0..maxn]of longint;
     n:longint;
     t1,t2,t0,x1,x2,t:int64;

function maxx(x,y:longint):longint;
begin
     maxx:=x;
     if y>x then maxx:=y;
end;

function minn(x,y:longint):longint;
begin
     minn:=x;
     if y<x then minn:=y;
end;

procedure swap(var x,y:longint);
var  z:longint;
begin
     z:=x;
     x:=y;
     y:=z;
end;

procedure qsort(l,r:longint);
var  tmp,mid,i,j:longint;
begin
     if l>=r then exit;
     i:=l;j:=r;
     mid:=a[(l+r) div 2];
     repeat
          while a[i]<mid do inc(i);
          while a[j]>mid do dec(j);
          if i<=j then
          begin
               swap(a[i],a[j]);
               inc(i);
               dec(j);
          end;
     until i>j;
     qsort(l,j);
     qsort(i,r);
end;

procedure open;
var  i:longint;
begin
     assign(f,fi);reset(f);
     readln(f, t1, t2, x1, x2 , t0);
     close(f);
end;

procedure main;
var  xopt,yopt,y,max:int64;
     x:longint;
     gt,tt,yy,kq:double;
begin
     assign(f,fo);rewrite(f);
     if t2=t0 then
     begin
          if t1=t0 then writeln(f,x1,' ',x2)
          else writeln(f,0,' ',x2);
          exit;
     end;
     tt:=(t0-t1)/(t2-t0);
     max:=0;
     kq:=1e15;
     for x:=1 to x1 do
     begin
          yy:=x*tt;
          if yy-trunc(yy)<=eps then y:=trunc(yy)
          else y:=trunc(yy)+1;
          y:=minn(y,x2);
          gt:=(x*t1+y*t2)/(x+y);
          if (gt-t0<kq) or ((abs(gt-t0-kq)<eps) and (x+y>max)) then
          begin
               kq:=gt-t0;
               max:=x+y;
               xopt:=x;
               yopt:=y;
          end;
     end;

     writeln(f,xopt,' ',yopt);
end;

begin
     open;
     main;
     close(f);
end.

{$O+,Q-,R-,S-}
program taskC;

uses math,sysutils;

var
  t1,t2,x1,x2,t0,y2,ans1,ans2:longint;t,max:extended;y1:int64;

begin
  //assign(input,'input.txt');
  //assign(output,'output.txt');

  read(t1,t2,x1,x2,t0);

  max:=maxlongint;ans1:=0;ans2:=0;

  if (t1=t0) and (t2=t0) then begin
    write(x1,' ',x2);
    halt;
  end;

  if t1=t0 then begin
    write(x1,' ',0);
    halt;
  end;

  if t2=t0 then begin
    write(0,' ',x2);
  end;

    {for y1:=0 to x1 do
    begin
      y2:=((t0-t1)*y1) div (t2-t0);

      if y1=0 then y2:=x2;

      t:=(t1*y1+t2*y2)/(y1+y2);
      while (t<t0)and(y2<=x2) do begin
        inc(y2);
        t:=(t1*y1+t2*y2)/(y1+y2);
      end;

      if (t>=t0)and(y2<=x2) then begin

      if t<max then begin
        ans1:=y1;ans2:=y2;max:=t;
      end
      else if (t-max<1e-20)and(ans1+ans2<y1+y2) then begin
          ans1:=y1;ans2:=y2;
        end;

      end;
    end;
  end else} begin
    for y2:=0 to x2 do
    begin
      if ((t0-t2)*y2)/(t1-t0)<=y1 then begin
      y1:=((t0-t2)*y2) div (t1-t0);
      if (y1<=x1)and(t1>=0) then begin
      if y2=0 then y1:=x1;

      t:=(t1*y1+t2*y2)/(y1+y2);
      {if t<t0 then inc(y1);
      t:=(t1*y1+t2*y2)/(y1+y2);}
      while (t<t0)and(y1<=x1) do begin
        inc(y1);
        t:=(t1*y1+t2*y2)/(y1+y2);
      end;

      if (t>=t0)and(y1<=x1) then begin

      if t<max then begin
        ans1:=y1;ans2:=y2;max:=t;
      end
      else if (t-max<1e-20)and(ans1+ans2<y1+y2) then begin
          ans1:=y1;ans2:=y2;
        end;

      end;
      end;
      end;
    end;
  end;

  write(ans1,' ',ans2);
end.

uses math;
var n,m,i,j,t,l,r,yy,zz,ii,jj:longint;
   j1,tt,tt1,t1,t2,x1,x2,t0:longint;

   k,mn:extended;
procedure prov(j1:longint);
begin
if i+j1=0 then exit;
  k:=(t1*i+t2*j1)/(i+j1);
  k:=k-t0;
  if k<0 then exit;
   if k<=mn then begin
                     ii:=i;
                     jj:=j1;
                     mn:=k;
                  end;

end;

begin

  read(t1,t2,x1,x2,t0);
  tt:=t2-t0;
  tt1:=t0-t1;
  mn:=t2;
  if tt1=0 then begin
                write( x1,' 0');
                halt;
               end;
  if tt=0 then begin
                write( '0 ',x2);
                halt;
               end;
   for i:=0 to x1 do
    begin
       j:=min(trunc(tt1/tt*i),x2);
      // if (j>x2)or(j<=0) then continue;
       prov(j);
       prov(j+1);

    end;

   if ii=0 then write('0 ',x2) else write(ii,' ',jj);

end.

program shablon;

{$MODE OBJFPC}{$H+}
{$O+ R-  Q-} {$ASSERTIONS ON} {$INLINE ON}
{$COperators ON}

uses
   SysUtils,
   Math;

const inf = 1 / 0;

procedure pout;
begin

    {$IFNDEF ONLINE_JUDGE}
    close(input);
    close(output);
    {$ENDIF}
    halt(0);
end;

procedure pinit;
begin
    {$IFNDEF ONLINE_JUDGE}
    assign(input, 'input.txt');
    assign(output, 'output.txt');
    reset(input);
    rewrite(output);
    {$ENDIF}

end;

procedure solve;
var t1, t2, x1, x2, t0 : int64;
    t, tt : extended;
    y, yy, y1, y2 : longint;
begin
    read(t1, t2, x1, x2, t0);
    y1 := 0;
    y2 := 0;
    if (t1 = t0) or (t2 = t0) then begin
        if (t1 = t0) then begin
            y1 := x1;
        end;
        if (t2 = t0) then begin
            y2 := x2;
        end;
        writeln(y1, ' ', y2);
        halt(0);
    end;
    y1 := 0;
    y2 := 0;
    t := inf;
    for y := 0 to x1 do begin
        yy := (t0 - t1) * y div (t2 - t0);
        if (t0 - t1) * y mod (t2 - t0) > 0 then begin
            inc(yy);
        end;
        if yy + y = 0 then yy := x2;
        if (yy + y > 0) and (yy <= x2) then begin
            //tt := (y * t1 + yy * t2) / (yy + y);
            tt := (y / (yy + y)) * t1 + (yy/(yy + y)) * t2;
            if tt >= t0 then begin
                if tt = t then begin
                    if (y + yy) > (y1 + y2) then begin
                        y1 := y;
                        y2 := yy;
                        t := tt;
                    end;
                end
                else if tt < t then begin
                    y1 := y;
                    y2 := yy;
                    t := tt;
                end;
            end;
        end;
    end;
    for yy := 0 to x2 do begin
        y := (t2 - t0) * yy div (t0 - t1);
        if (t2 - t0) * yy mod (t0 - t1) > 0 then begin
            inc(y);
        end;
        if yy + y = 0 then y := x1;
        if (y + yy > 0) and (y <= x1) then begin
//            tt := (y * t1 + yy * t2) / (yy + y);
            tt := (y / (yy + y)) * t1 + (yy/(yy + y)) * t2;
            if (tt >= t0) then begin
                if tt = t then begin
                    if (y + yy) > (y1 + y2) then begin
                        y1 := y;
                        y2 := yy;
                        t := tt;
                    end;
                end
                else if tt < t then begin
                    y1 := y;
                    y2 := yy;
                    t := tt;
                end;
            end;
        end;
    end;
    writeln(y1, ' ', y2);
end;

begin
    pinit;
    solve;
    pout;
end.

var te,min,i,t1,t2,t0,x1,x2,y1,y2,y01,y02: integer;
    dt: real;
begin
 readln(t1,t2,x1,x2,t0);
 min:=-1;
 dt:=100000;

 if t0<t1 then writeln(x1,' 0') else if t0>t2 then writeln('0 ',x2) else begin

  for y1:=0 to x1 do begin
   te:=round(int(y1*(t0-t1)/(t2-t0)+0.99999));
   if (te=0)and(t2-t0<dt)and(t2-t0>=0) then  dt:=t2-t0;
   if (te<>0)and(te<=x2)and((t1*y1+t2*te)/(te+y1)-t0>-0.001) and ((t1*y1+t2*te)/(te+y1)-t0<dt) then
   dt:=(t1*y1+t2*te)/(te+y1)-t0;
  end;

  for y1:=0 to x1 do begin
   te:=round(int(y1*(t0-t1)/(t2-t0)+0.99999));
   if (te=0) then te:=x2;
   if (te=0) and(abs(t2-t0-dt)<=0.0001)and(te+y1>=min) then begin
    min:=te+y1;
    y01:=y1;
    y02:=te;
   end;
    if (te<>0)and(abs((t1*y1+t2*te)/(te+y1)-t0-dt)<=0.0001)and(te<=x2)and(te+y1>min) then begin
    min:=te+y1;
    y01:=y1;
    y02:=te;
   end;
  end;

 end;
 writeln(y01,' ',y02);
 readln;
end.

program Project1;

{$APPTYPE CONSOLE}
{$R+}
{$Q+}

uses
  SysUtils;

const
  inf = int64(2000000000) * int64(2000000000);
var
  t1, t2, t0, x1, x2, i: longint;
  r1, r2, tmp: longint;
  best, t: extended;
  tmp_v: int64;

function f(a1, a2: longint): extended;
begin
  if (a1 = 0) and (a2 = 0) then
    result := inf
  else
    result := (a1 * t1 + a2 * t2) / (a1 + a2);
end;

begin
  //reset(input, 'input.txt');
  //rewrite(output, 'output.txt');

  read(t1, t2, x1, x2, t0);

  best := inf;
  r1 := -1;
  r2 := -1;

  if (t0 = t1) and (t0 = t2) then
  begin
    writeln(x1, ' ', x2);
    halt(0);
  end;

  if (t0 = t1) then
  begin
    writeln(x1, ' ', 0);
    halt(0);
  end;

  if (t0 = t2) then
  begin
    writeln(0, ' ', x2);
    halt(0);
  end;

  for i := 0 to x1 do
  begin

    t := i * (t0 - t1) / (t2 - t0);
    if (trunc(t) = t) then
      tmp_v := trunc(t)
    else
      tmp_v := trunc(i * (t0 - t1) / (t2 - t0)) + 1;

    if (tmp_v >= 0) and (tmp_v <= x2) then
      tmp := tmp_v
    else
      tmp := -1;

    if (tmp <> -1) and (((best - t0) > (f(i, tmp) - t0)) or
        (((best - t0) = (f(i, tmp) - t0)) and ((r1 + r2) < (i + tmp))
    )) then
    begin
      r1 := i;
      r2 := tmp;
      best := f(i, tmp);
    end;
  end;

  writeln(r1, ' ', r2);

end.

const   fi='';
        fo='';
        oo=trunc(1e9);
var     t1,t2,x1,x2,t0,y1,y2,res1,res2:longint;
        t,min:real;
procedure       rinf;
begin
        assign(input,fi);
        reset(input);
        read(t1,t2,x1,x2,t0);
        close(input);
end;

function        ok:boolean;
begin
        if (y1+y2=0) then exit(false);
        t:=((y1*t1)+(y2*t2)) / (y1+y2);
        if t>=t0 then exit(true)
        else exit(false);
end;

procedure       solve;
var     mid,l,r:longint;
begin
        min:=oo;
        for y1:=0 to x1 do
           begin
                l:=0;r:=x2;
                repeat
                        y2:=(l+r) div 2;
                        if ok then
                          begin
                                r:=y2-1;
                                if (t<min)  then
                                  begin
                                        min:=t;
                                        res1:=y1;
                                        res2:=y2;
                                  end
                                else
                                  if (t=min) and (y1+y2>res1+res2) then
                                    begin
                                        res1:=y1;
                                        res2:=y2;
                                    end;
                          end
                        else l:=y2+1;
                until l>r;
           end;
end;

procedure       winf;
begin
        assign(output,fo);
        rewrite(output);
        write(res1,' ',res2);
        close(output);
end;

begin
        rinf;
        solve;
        winf;
end.

var
  sum,x1,x2,t0,t1,t2,x,y,i,j:int64; ans,raz:extended;

function fun(i,j:extended):extended;
begin
  exit((t1*i+t2*j)/(i+j));
end;

procedure dichotomy(i:int64;var j:int64;var raz:extended);
var l,r,m:int64; c1,c2:extended;
begin
  if i=0 then l:=1 else l:=0; r:=x2;
  while (r-l>1) do
  begin
    m:=(l+r) div 2;
    if fun(i,m)>=t0 then r:=m else l:=m;
  end;
  if (fun(i,l)>=t0) and (fun(i,r)>=t0) then
  begin
    c1:=abs(fun(i,l)-t0); c2:=abs(fun(i,r)-t0);
    if (c1>=c2)
    then begin j:=r; raz:=fun(i,l); end
    else begin j:=l; raz:=fun(i,r); end;
  end
    else
  begin
    if fun(i,l)>=t0 then begin j:=l; raz:=fun(i,l); end else
    if fun(i,r)>=t0 then begin j:=r; raz:=fun(i,r); end else j:=-1;
  end;

end;

begin

  readln(t1,t2,x1,x2,t0); ans:=1e18; i:=0;
  while i<=x1 do
  begin
    dichotomy(i,j,raz);
    if (j<>-1) and ((raz<ans) or ((raz=ans) and (sum<i+j)))
    then
    begin
      ans:=raz; sum:=i+j;
      x:=i; y:=j;
    end;
    inc(i);
  end;
  writeln(x,' ',y);

end.

{$R+,Q+,I+}
{$apptype console}
Uses SysUtils;
Const
   e=0.0001;
Var
   t1,t2,x1,x2,t0,t:Int64;
   i1,j1,i,j:Integer;
   r,s,t3:Real;
Begin
   Read(t1,t2,x1,x2,t0);
   If t0=t1 Then Begin
      Write(x1,' ',0);
      Halt;
   End;
   If t0=t2 Then Begin
      Write(x2,' ',0);
      Halt;
   End;
   r:=High(Integer);
   t:=High(Integer);
   i1:=0;
   j1:=0;
   For i:=0 To x1 Do Begin
      s:=i*(t1-t0)/(t0-t2);
      j:=Round(s);
      If j<s Then j:=j+1;
      If j>x2 Then j:=x2;
      If j<0 Then j:=0;
      If (i=0) and (j=0) Then Continue;
      t3:=(t1*i+t2*j)/(i+j);
      If (t3>t0) or (abs(t3-t0)<e) Then Begin
         If (abs(t3-t0-r)<e) and (i+j>t) Then Begin
            t:=i+j;
            i1:=i;
            j1:=j;
         End
         Else If t3-t0<r Then Begin
            r:=t3-t0;
            t:=i+j;
            i1:=i;
            j1:=j;
         End;
      End;
   End;
   If (i1<>0) and (j1<>0) Then Write(i1,' ',j1)
   Else Write(0,' ',x2);
End.

const eps=1e-7;
var t1,t2,x1,x2,t0,max1,max2:int64;
    i,j:longint;
    min,t:extended;
Begin
 read(t1,t2,x1,x2,t0);
 min:=1e9;
 if t0=t2
   then if t0=t1
          then begin
                writeln(x1,' ',x2);
                halt;
               end
          else begin
                writeln(0,' ',x2);
                halt;
               end;
 if t0=t1
   then begin
         writeln(x1,' ',0);
         halt;
        end;

 for i:=1 to x1 do
  begin
   j:=(t1*i-t0*i) div (t0-t2);
   j:=j-1;
   if j=-1 then j:=0;
   t:=(t1*i+t2*j)/(i+j);
   while (t<t0) and (j<=x2) do
    begin
     j:=j+1;
     t:=(t1*i+t2*j)/(i+j);
    end;
   if j>x2 then continue;
   if ((abs(t-min)<eps) and (i+j>max1+max2)) or ((min+eps>t) and (t+eps>t0))
     then begin
           min:=t;
           max1:=i;
           max2:=j;
          end;
  end;
 for j:=1 to x2 do
  begin
   i:=(t1*j-t0*j) div (t0-t2);
   i:=i-1;
   if i=-1 then i:=0;
   t:=(t1*i+t2*j)/(i+j);
   while (t<t0) and (i<=x1) do
    begin
     i:=i+1;
     t:=(t1*i+t2*j)/(i+j);
    end;
   if i>x2 then continue;
   if ((abs(t-min)<eps) and (i+j>max1+max2)) or ((min+eps>t) and (t+eps>t0))
     then begin
           min:=t;
           max1:=i;
           max2:=j;
          end;
  end;
 writeln(max1,' ',max2);

End.

program cf126a;
const eps=1e-7;
var
  n,i,j,y1:longint;
  an1,an2,y2,t1,t2,x1,x2,t0,dd:int64;
  ans,d:double;
begin
  readln(t1,t2,x1,x2,t0);
  if t2=t0 then begin
    writeln(0,' ',x2);
    halt;
  end;

  ans:=1e50;
  for y1:=x1 downto 1 do begin
    d:=(t0*y1-t1*y1)/(t2-t0);
    y2:=trunc(d);
    if y2<d-eps then inc(y2);
    if y2<=x2 then begin
      d:=(t1*y1+t2*y2)/(y1+y2);
      if d<ans-eps then begin
        an1:=y1;
        an2:=y2;
        ans:=d;
      end;
    end;
  end;
  if t2<ans-eps then begin
    an1:=0;
    an2:=x2;
  end;

  writeln(an1,' ',an2);
end.

var n,m,i,j,t,l,r,yy,zz,ii,jj:longint;
   tt,tt1,t1,t2,x1,x2,t0:longint;

   k,min:extended;

begin

  read(t1,t2,x1,x2,t0);
  tt:=t2-t0;
  tt1:=t0-t1;
  min:=t0;
  if tt=0 then begin
                write( x1,' 0');
                halt;
               end;
  if tt1=0 then begin
                write( '0 ',x2);
                halt;
               end;
   for i:=1 to x1 do
    begin
       j:=round(tt1/tt*i);
       if (j>x2)or(j=0) then continue;
       k:=tt/tt1-i/j;
       if k<0 then continue;
       if k<=min then begin
                      ii:=i;
                      jj:=j;
                      min:=k;
                     end;

    end;

   write(ii,' ',jj);

end.

PROGRAM C93;
uses  math;
var x1, x2, y1, y2, n, t1, t2, t0 : int64;
    res : double;

procedure slove;
var i : longint; j : int64;
begin
   if (t1 = t0) then
      begin
         y1:= x1;
         exit;
      end;
   if (t2 = t0) then
      begin
         y2:= x2;
         exit;
      end;
   res:= maxlongint;
   for i:= 1 to x2 do
      begin
         j:= trunc(((t2 - t0) / (t0 - t1)) * i);
         if (j <= x1) and (res >= (t1 * j + t2 * i) / (i + j)) then
            begin
               y1:= j;
               y2:= i;
               res:= (t1 * j + t2 * i) / (i + j)
            end;
      end;
end;

BEGIN
   readln(t1, t2, x1, x2, t0);
   slove;
   writeln(y1, ' ', y2);
END.

{$Mode ObjFPC}
const fi='';
      fo='';
      nmax=1000000;
var t0,i,j,x,y,cs,csc:longint;
    t1,t2,x1,x2:qword;
    min:real;
begin
    assign(input,fi); reset(input);
    assign(output,fo); rewrite(output);
    read(t1,t2,x1,x2,t0);
    x:=t2-t0;
    y:=t0-t1;
    if (x=0) or (y=0) then
        begin
            if x=0 then
                begin
                    if y<>0 then write('0 ',x2)
                    else write(x1,' ',x2);
                end
            else write(x1,' 0');
        end
    else
        begin
            min:=1e32;
            cs:=0;
            for i:=x2 downto 1 do
                begin
                    j:=trunc((i*x)/y);
                    if j>x1 then j:=x1;
                    if (i+j<>0) and (j<=x1) and ((t1*j+t2*i)/(i+j)-t0>=0) and ((t1*j+t2*i)/(i+j)-t0<min) then
                        begin
                            cs:=i;
                            csc:=j;
                            min:=(t1*j+t2*i)/(i+j)-t0;
                        end;
                    if (j+1<=x1) and ((t1*(j+1)+t2*i)/(i+j+1)-t0>=0) and ((t1*(j+1)+t2*i)/(i+j+1)-t0<min) then
                        begin
                            cs:=i;
                            csc:=j+1;
                            min:=(t1*(j+1)+t2*i)/(i+j+1)-t0;
                        end;
                end;
            write(csc,' ',cs);
        end;
    close(input);
    close(output);
end.

var  i:longint;
     x1,x2,t1,t2,t:int64;
     tt,t1m,t2m:int64;
     mnt,nt:real;
begin
 readln(t1,t2,x1,x2,t);

 mnt:=-10000000;
 if (t=t2) and (t=t1) then
  begin

    writeln(x1,' ',x2);
    halt;
  end;

    if t1<>t then
    begin
    tt:=x2;
    x2:=x1;
    x1:=tt;

    tt:=t1;
    t1:=t2;
    t2:=tt;
    for i:=x1 downto 0 do
  begin
    if trunc(i*(t-t1)/(t2-t))<>i*(t-t1)/(t2-t) then tt:=trunc(i*(t-t1)/(t2-t))+1
     else tt:=trunc(i*(t-t1)/(t2-t));
    if (tt+i=0) or (tt<0) then continue;
    if tt>x2 then tt:=x2;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or
    ((nt>=t) and (abs(abs(nt-t)-abs(mnt-t))<=0.00000001) and ((i+tt)>=t1m+t2m)) then
     begin
      t1m:=tt;
      t2m:=i;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
  end;

    end;

{  if t2<>t then
  begin
  if t1<>t then
  begin
     tt:=x2;
    x2:=x1;
    x1:=tt;

    tt:=t1;
    t1:=t2;
    t2:=tt;
    end;
 for i:=x1 downto 0 do
  begin
    if trunc(i*(t-t1)/(t2-t))<>i*(t-t1)/(t2-t) then tt:=trunc(i*(t-t1)/(t2-t))+1
     else tt:=trunc(i*(t-t1)/(t2-t));
    if (tt+i=0) or (tt<0) then continue;
    if tt>x2 then tt:=x2;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or
    ((nt>=t) and (abs(abs(nt-t)-abs(mnt-t))<=0.00000001) and ((i+tt)>=t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
  end;

   end; }

   writeln(t1m,' ',t2m);
end.

var  i:longint;
     x1,x2,t1,t2,t:int64;
     tt,t1m,t2m:int64;
     mnt,nt:real;
begin
 readln(t1,t2,x1,x2,t);

 mnt:=-10000000;
 if (t=t2) and (t=t1) then
  begin

    writeln(x1,' ',x2);
    halt;
  end;

    if t1<>t then
    begin
    tt:=x2;
    x2:=x1;
    x1:=tt;

    tt:=t1;
    t1:=t2;
    t2:=tt;
    for i:=x1 downto 0 do
  begin
    if trunc(i*(t-t1)/(t2-t))<>i*(t-t1)/(t2-t) then tt:=trunc(i*(t-t1)/(t2-t))+1
     else tt:=trunc(i*(t-t1)/(t2-t));
    if (tt+i=0) or (tt<0) then continue;
    if tt>x2 then tt:=x2;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or
    ((nt>=t) and (abs(abs(nt-t)-abs(mnt-t))<=0.00000001) and ((i+tt)>t1m+t2m)) then
     begin
      t1m:=tt;
      t2m:=i;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
  end;

    end;

  if t2<>t then
  begin
  if t1<>t then
  begin
     tt:=x2;
    x2:=x1;
    x1:=tt;

    tt:=t1;
    t1:=t2;
    t2:=tt;
    end;
 for i:=x1 downto 0 do
  begin
    if trunc(i*(t-t1)/(t2-t))<>i*(t-t1)/(t2-t) then tt:=trunc(i*(t-t1)/(t2-t))+1
     else tt:=trunc(i*(t-t1)/(t2-t));
    if (tt+i=0) or (tt<0) then continue;
    if tt>x2 then tt:=x2;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or
    ((nt>=t) and (abs(abs(nt-t)-abs(mnt-t))<=0.00000001) and ((i+tt)>t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
  end;

   end;

   writeln(t1m,' ',t2m);
end.

{$O-}
Uses Math;
const eps = 1e-6;
var
	x1, x2, ans, y2, y1, res, i, n, ai, bi, l, r, m: longint;
        t1, t2, t, otv, gr: extended;

begin
	{$ifndef online_judge}
        reset(input, 'a.in');
        rewrite(output, 'a.out');
        {$endif}
        readln(t1, t2, x1, x2, t);
        otv := 1e12;
        res := -maxlongint;
        ai := 0; bi := 0;
        for i := x1 downto 0 do begin
        	y1 := i;
        	l := 0; r := x2; ans := 0;
        	while (l <= r) do begin
        		m := (l + r) shr 1;
            		if (y1 + m = 0) then break;
        		gr := (t1 * y1 + t2 * m) / (y1 + m);
        		if gr >= t then begin
        			ans := 1;
        			y2 := m;
        	      	end;
        		if gr < t then l := m + 1 else r := m - 1;
            	end;
            	if (ans > 0) then gr := (t1 * y1 + t2 * y2) / (y1 + y2);
            	if (ans > 0) and ((abs(gr - t) < otv) or ((abs(gr - otv) < eps) and (y1 + y2 > res))) then begin
            		otv := abs(gr - t);
            		res := y1 + y2;
            		ai := y1;
            		bi := y2;
             	end;
   	end;
   	writeln(ai, ' ', bi);
end.

uses math;
var i,yn,ans1,ans2,y1,y2,x1,x2:longint;
    anst,t1,t2,t0,ct:extended;
     begin
     anst:=1000000000000000000;
      readln(t1,t2,x1,x2,t0);
      for y1:=0 to x1 do
       begin
        if t2-t0=0 then yn:=x2 else
        yn:=trunc((y1*(t0-t1))/(t2-t0));
        for i:=-2 to 2 do
         begin
          y2:=yn+i;
          if y2>x2 then continue;
          if y2<0 then continue;
          if (y1+y2)<0.0000001 then continue;
          ct:=(t1*y1+t2*y2)/(y1+y2);
          if (ct>=t0) then
           begin
            if (ct<anst) or ((ct=anst) and (min(y2,y1)>=min(ans1,ans2))) then
             begin
              anst:=ct;
              ans1:=y1;
              ans2:=y2;
             end;
           end;
         end;
       end;
     writeln(ans1,' ',ans2);
    end.

const eps=1e-8;
var t1,t2,x1,x2,t0,i,j,max1,max2:longint;
    min,t:extended;
Begin
 read(t1,t2,x1,x2,t0);
 min:=1e9;
 if t0=t2
   then if t0=t1
          then begin
                writeln(x1,' ',x2);
                halt;
               end
          else begin
                writeln(0,' ',x2);
                halt;
               end;
 if t0=t1
   then begin
         writeln(x1,' ',0);
         halt;
        end;

 for i:=1 to x1 do
  begin
   j:=(t1*i-t0*i) div (t0-t2);
   j:=j-1;
   if j=-1 then j:=0;
   t:=(t1*i+t2*j)/(i+j);
   while (t>=t0) and (j>0) do
    begin
     j:=j-1;
     t:=(t1*i+t2*j)/(i+j);
    end;
   while (t<t0) and (j<=x2) do
    begin
     j:=j+1;
     t:=(t1*i+t2*j)/(i+j);
    end;
   if j>x2 then continue;
   if ((abs(t-min)<eps) and (t1+t2>max1+max2)) or ((min+eps>t) and (t+eps>t0))
     then begin
           min:=t;
           max1:=i;
           max2:=j;
          end;
  end;
 for j:=1 to x1 do
  begin
   i:=(t1*j-t0*j) div (t0-t2);
   i:=i-1;
   if i=-1 then i:=0;
   t:=(t1*i+t2*j)/(i+j);
   while (t>=t0) and (i>0) do
    begin
     i:=i-1;
     t:=(t1*i+t2*j)/(i+j);
    end;
   while (t<t0) and (i<=x1) do
    begin
     i:=i+1;
     t:=(t1*i+t2*j)/(i+j);
    end;
   if i>x2 then continue;
   if ((abs(t-min)<eps) and (t1+t2>max1+max2)) or ((min+eps>t) and (t+eps>t0))
     then begin
           min:=t;
           max1:=i;
           max2:=j;
          end;
  end;
 writeln(max1,' ',max2);

End.

var t1,t2,x1,x2,t0,k,h,p,y1d,y2d,y1x,y2x:int64;
   i:longint;
    shang:extended;
function min(x,y:int64):int64;
begin
 if x<y then exit(x) else exit(y);
end;
function make(x,y:int64):int64;
var t:int64;
begin
 if x<y then begin t:=x;x:=y;y:=t;end;
 while x mod y<>0 do
  begin
  t:=y;
  y:=x mod y;
  x:=t;
  end;
 exit(y);
end;
begin
 readln(t1,t2,x1,x2,t0);
 if t0<=t1 then begin writeln(x1,' ',0);halt end;
 if t0>=t2 then begin writeln(0,' ',x2);halt end;
 h:=make(t2-t0,t0-t1);
 k:=min(x1 div((t2-t0)div h),x2 div((t0-t1)div h)
 );
 if k>0 then
   begin
    writeln(((t2-t0)div h)*k,' ',((t0-t1)div h)*k);
    halt;
   end;
 shang:=(t0-t1)/(t2-t0);
 for i:=x1 downto 1 do
  begin
  p:=trunc(i*shang)+1;
  if p>x2 then p:=x2;
  if p*(t2-t0)>(t0-t1)*i then
   begin
    if y1d=0 then begin y1d:=i;y2d:=p end
     else if p*y1d<i*y2d then begin y1d:=i;y2d:=p end
   end
  end;
 if y1d=0 then writeln(0,' ',x2) else
 writeln(y1d,' ',y2d);
end.

program Project3;

{$APPTYPE CONSOLE}

uses
  SysUtils;
type dr = record
  chic, znam: int64;
end;

var
  t1, t2, x1, x2, t0, miny1, miny2, y2, x: longint;
  l, r: longint;
  mint: extended;
  function temp(y2, y1: longint): extended;
  begin
    temp := (y1 * t1 + t2 * y2)/(y1 + y2);
  end;
 { function nod(a, b: int64): int64;
  begin
    if (a = 0) or (b = 0) then
    begin
      nod := a + b
      exit;    }

begin
{  assign(input, 'input.txt');
  reset(input);
  assign(output, 'output.txt');
  rewrite(output);     }
  readln(t1, t2, x1, x2, t0);
  mint := 100000000000000000;
  for y2 := x2 downto 0 do
  begin
    l := 0;
    if y2 = 0 then
      l := 1;
    r := x1 + 1;
    while r - l > 1 do
    begin
      x := (l + r) div 2;
      if temp(y2, x) < t0 then
        r := x
      else
        l := x;
    end;
    if (temp(y2, l) = mint) and (y2 + l > miny2 + miny1) then
    begin
      mint := temp(y2, l);
      miny2 := y2;
      miny1 := l;
    end;
    if (temp(y2, l) >= t0) and (temp(y2, l) < mint) then
    begin
      mint := temp(y2, l);
      miny2 := y2;
      miny1 := l;
    end;
  end;

  writeln(miny1,' ', miny2);

end.

program pr1;

{$APPTYPE CONSOLE}

{type int64=longint; }
const
 eps=1e-13;  nnn=2000000;
 label 1;
var t1,t2,x1,x2,y1,y2,t0,nn,ot,mmax,w,t,kol,i,j,m,k,imax,p,h,jj:longint;
n,s,step2:int64;
blizt:array[0..2000000,-1..2] of double;
minotkl:double; y1bl,ibl,y2bl:longint;

flag,flagggg:boolean;
ott:double;
function min (a,b:longint):longint;begin min:=b;if a<b then min:=a;  end;
function max (a,b:longint):longint;begin max:=b;if a>b then max:=a;  end;

function nod(a,b:longint):longint; var p,t:longint;
begin if (a>0)and(b>0) then
   begin while (b>0) do begin t:=a mod b;a:=b;b:=t;    end;
    p:=a;
   end else if a=0 then p:=b else p:=a;
nod:=p;
end;

function pr(n:longint):boolean; var i,j:longint;flag:boolean;
 begin  flag:=true;
      for i:=2 to n-1 do if n mod i=0 then flag:=false;
   pr:=flag;
 end;

begin
{assign (input,'input.txt');reset(input);
      assign (output,'output.txt'); rewrite(output);
}read(t1,t2,x1,x2,t0);
if (t1=t0)and(t2=t0) then begin  writeln(x1,' ',x2);goto 1;  end;
if (t1=t0)and(t2>t0) then begin  writeln(x1,' ',0);goto 1;  end;
if (t1<t0)and(t2=t0) then begin  writeln(0,' ',x2);goto 1;  end;
  for y2:=0 to x2 do
begin
  y1:=trunc(y2*(t0-t2)/(t1-t0)); {writeln(y2,' ',y1); }
   for i:=-1 to 2 do
   if (y1+i+y2<>0)and(y1+i<x1) then blizt[y2,i]:=(t1*(y1+i)+t2*y2)/(y1+i+y2)
   else blizt[y2,i]:=100000000000;
end;

{ for y2:=0 to x2 do
 begin write(y2,'   '); for i:=-1 to 2 do write(blizt[y2,i]:0:3,' ');writeln;  end;
}

minotkl:=100000000;
 for y2:=0 to x2 do for i:=-1 to 2 do
   begin   y1:=trunc(y2*(t0-t2)/(t1-t0));
    if ((y1+i)<=x1)and(blizt[y2,i]>=t0)and (abs(blizt[y2,i]-t0)<=minotkl) then
        begin
          y2bl:=y2;
          ibl:=i;minotkl:=abs(blizt[y2,i]-t0) ;
          y1bl:=y1+i;
          {writeln('ttt ',y2,' ',y1); }
        end;

   end;
writeln(y1bl,' ',y2bl);

   1:   close(output);
end.

uses  math;
var  t1,t2,x1,x2,t:longint;
     y1,y2:int64;

procedure th1;
begin
     if 2*min(x1,x2) > max(x1,x2) then
     begin
          y1:=min(x1,x2);
          y2:=y1;
     end
     else
     begin
          y1:=0;
          y2:=0;
          if x1>x2 then y1:=x1 else y2:=x2;
     end;
end;

procedure th2;
begin
     y1:=x1;
     y2:=0;
end;

procedure th3;
begin
     y1:=0;
     y2:=x2;
end;

procedure th4;
var  i,j:longint;
     k1,k2:int64;
     s:real;
begin
     k1:=t2-t;
     k2:=t-t1;
     j:=1;
     y1:=0;
     y2:=x2;

     for i:=1 to x1 do
     begin
          while k2*i > k1*j do
          begin
               inc(j);
               if j>x2 then exit;
          end;
          if y1*j <= y2*i then
          begin
               y1:=i;
               y2:=j;
          end;
     end;
end;

begin
     readln(t1,t2,x1,x2,t);
     if (t=t1) and (t=t2) then th1
        else if t=t1 then th2
             else if t=t2 then th3
                  else th4;
     writeln(y1,' ',y2);
     readln;
end.

var t1, t2, x1, x2, t0: Longint;
    x, t, e, min: Extended;
    i, j, r1, r2, max: Longint;

Begin;
    e := 0.000000001;
    read(t1, t2, x1, x2, t0);
    if t2 = t0 then begin
        if t1 = t2 then
            write(x1, ' ' , x2)
        else
            write(0,' ' ,x2);
        halt;
    end;

    min := t2;
    max := x2;
    r1 := 0;
    r2 := x2;

    for i := 1 to x1 do begin
        x := i * (t0 - t1) / (t2 - t0);
        if trunc(x) = x then
            j := trunc(x)
        else
            j := trunc(x) + 1;
        if x < 0 then
            j := 0;
        if (j <= x2) and (j >= 0) then begin
            t := (t1 * i + t2 * j) / (i + j);
        if ((t < min) or ((abs(t - min) < e) and (i + j > max))) and (t >= t0) then begin
            max := i + j;
            r1 := i;
            r2 := j;
            min := t;
        end;
        end;

        j := x2;
        t := (t1 * i + t2 * j) / (i + j);
        if ((t < min) or ((abs(t - min) < e) and (i + j > max))) and (t >= t0) then begin
            max := i + j;
            r1 := i;
            r2 := j;
            min := t;
        end;
    end;

    write(r1,' ' ,r2);
End.

const
        fi='';
var
        f:text;
        t1,t2,x1,x2,t0,ra1,ra2:longint;
        tmp:real;
procedure nhap;
begin
        assign(f,fi);
        reset(f);
        readln(f,t1,t2,x1,x2,t0);
        close(f);
end;
procedure xuly;
var
        u,v,x,q:real;
        i,k:longint;
begin
        if t1=t2 then
        begin
                ra1:=x1; ra2:=x2;
                exit;
        end;
        u:=(t0-t1)/(t2-t0);
        tmp:=1000000000;
        for i:=1 to x1 do
        begin
                v:=i*u;
                q:=v;
                v:=trunc(v);
                if v<=x2 then
                begin
                        k:=trunc(v);
                        x:=(t1*i+t2*k)/(k+i);
                        if x>=t0 then
                        begin
                        if x<tmp then
                        begin
                                ra1:=i;
                                ra2:=k;
                                tmp:=x;
                        end
                        else
                        if x=tmp then
                        begin
                                if (i+k)>(ra1+ra2) then
                                begin
                                        ra1:=i;
                                        ra2:=k;
                                end;
                        end;
                        end;
                end;
                if q>trunc(q) then
                begin
                v:=trunc(q)+1;
                if v<=x2 then
                begin
                        k:=trunc(v);
                        x:=(t1*i+t2*k)/(k+i);
                        if x<t0 then continue;
                        if x<tmp then
                        begin
                                ra1:=i;
                                ra2:=k;
                                tmp:=x;
                        end
                        else
                        if x=tmp then
                        begin
                                if (i+k)>(ra1+ra2) then
                                begin
                                        ra1:=i;
                                        ra2:=k;
                                end;
                        end;
                end;
                end;
        end;
end;
begin
        nhap;
        xuly;
        writeln(ra1,' ',ra2);
end.

var te,min,i,t1,t2,t0,x1,x2,y1,y2,y01,y02: integer;
    dt: real;
begin
 readln(t1,t2,x1,x2,t0);
 min:=-1;
 dt:=100000;

 if t0<t1 then writeln(x1,' 0') else if t0>t2 then writeln('0 ',x2) else begin

  for y1:=0 to x1 do begin
   te:=round(int(y1*(t0-t1)/(t2-t0)+0.99999));
   if (te=0)and(t2-t0<dt)and(t2-t0>=0) then  dt:=t2-t0;
   if (te<>0)and(te<=x2)and((t1*y1+t2*te)/(te+y1)-t0>-0.001) and ((t1*y1+t2*te)/(te+y1)-t0<dt) then
   dt:=(t1*y1+t2*te)/(te+y1)-t0;
  end;

  for y1:=0 to x1 do begin
   te:=round(int(y1*(t0-t1)/(t2-t0)+0.99999));
   if (te=0) then te:=x2;
   if (te=0) and(abs(t2-t0-dt)<=0.0001)and(te+y1>=min) then begin
    min:=te+y1;
    y01:=y1;
    y02:=te;
   end;
    if (te<>0)and(abs((t1*y1+t2*te)/(te+y1)-t0-dt)<=0.0001)and(te<=x2)and(te+y1>min) then begin
    min:=te+y1;
    y01:=y1;
    y02:=te;
   end;
  end;

 end;
 writeln(y01,' ',y02);
 readln;
end.

var i,x2:longint;
    a,b,t,t1,t2,x1,y1,y2:real;
begin
  readln(t1,t2,x1,x2,t);
  a:=1-t1/t;
  b:=1-t2/t;
  for i:=x2 downto 0 do
   begin
     y2:=i;
     if (y2*b)/a=trunc((y2*b)/a) then
      begin
        y1:=-y2*b/a;
        break;
      end;
   end;
  writeln(trunc(y1),' ',trunc(y2));
end.

Var N,M,i,j,k,l,v,r,t1,t2,t0,x1,x2,minx1,minx2:longint;
t,t3:real;
Begin
{assign(input,'input.txt');
reset(input);
assign(output,'output.txt');
rewrite(output);}
readln(t1,t2,x1,x2,t0);
t:=1000000000;
v:=0;
For i:=0 to x1 do begin
  l:=0;
  r:=x1;
  While l<=r do begin
    m:=(l+r) div 2;
    if (i<>0) or (m<>0) then
      t3:=((t1*i)+(t2*m))/(i+m)
    else
      t3:=0;
    if t3<t0 then
      l:=m+1
    else begin
      if (t3-t0=t) and (v>m+t) then begin
        t:=t3-t0;
        v:=m+i;
        minx1:=i;
        minx2:=m;
      end;
      if t3-t0<t then begin
        t:=t3-t0;
        v:=m+i;
        minx1:=i;
        minx2:=m;
      end;
    r:=m-1;
    end;
  end;
end;
writeln(minx1,' ',minx2);
end.

var  i:longint;
     x1,x2,t1,t2,t:int64;
     tt,t1m,t2m:longint;
     mnt,nt:real;
begin
 readln(t1,t2,x1,x2,t);

 if t=t2 then
  begin
    writeln(0,' ',x2);
    halt;
  end;

 for i:=x1 downto 0 do
  begin
    tt:=round(i*(t-t1)/(t2-t));
    if tt+i=0 then continue;
    if tt>x2 then tt:=x2;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or ((nt>=t) and (abs(nt-t)=abs(mnt-t)) and ((i+tt)>t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
  end;

writeln(t1m,' ',t2m);
end.

program Project1;

{$APPTYPE CONSOLE}
{$R+}
{$Q+}

uses
  SysUtils;

const
  inf = int64(2000000000) * int64(2000000000);
var
  t1, t2, t0, x1, x2, i: longint;
  r1, r2, tmp: longint;
  best: extended;

function f(a1, a2: longint): extended;
begin
  if (a1 = 0) and (a2 = 0) then
    result := inf
  else
    result := (a1 * t1 + a2 * t2) / (a1 + a2);
end;

function binfind(x: longint): longint;
var
  l, r: longint;
  m: extended;
begin
  l := -1;
  r := x2;
  while (l + 1 < r) do
  begin
    m := f(x, (l + r) div 2);
    if (m < t0) or (m = inf) then
      l := (l + r) div 2
    else
      r := (l + r) div 2;
  end;

  if (f(x, r) < t0) then
    result := -1
  else
    result := r;
end;

begin
  //reset(input, 'input.txt');
  //rewrite(output, 'output.txt');

  read(t1, t2, x1, x2, t0);

  best := inf;
  r1 := -1;
  r2 := -1;

  for i := 0 to x1 do
  begin
    tmp := binfind(i);
    if (tmp <> -1) and (((best - t0) > (f(i, tmp) - t0)) or
        (((best - t0) = (f(i, tmp) - t0)) and ((r1 + r2) < (i + tmp))
    )) then
    begin
      r1 := i;
      r2 := tmp;
      best := f(i, tmp);
    end;
  end;

  writeln(r1, ' ', r2);

end.

{$mode delphi}
program Project1;
Uses SysUtils, Math;
var y2,t1,t2,x1,x2,t,y1:longint;
		min,t0:extended;
    miny1,miny2:int64;
function f(y1,y2:longint):extended;
var l:extended;
begin
	l:= t1 * (y1 / (y1 + y2)) + t2 * (y2 / (y1 + y2)) - t;
  f:=l;
end;
procedure check (y1,y2:int64);
	begin
  	//if (y1=33332) then writeln('a ', y2, ' ', (t1*y1 + t2*y2) / (y1 + y2), ' xx ', (t1*miny1 + t2*miny2) / (miny1 + miny2));

  	if (y2 > x2) or (y2<0) then exit
    	else if t*(y1 + y2) <= t1*y1 + t2*y2 then

      if (miny1=-1) or ((t1*y1 + t2*y2) / (y1 + y2) < (t1*miny1 + t2*miny2) / (miny1 + miny2)) then begin
      	miny1:=y1;
        miny2:=y2;
        //writeln(miny1, ' ', miny2);
      end;
  end;
begin
	//assign (input,'input.txt'); reset (input);
  //assign (output,'output.txt'); rewrite (output);
  read (t1,t2,x1,x2,t);
  if t2 = t then begin
  	write (0,' ',x2);
  	exit;
  end;
  if t1 = t then begin
  	write (x1,' ',0);
  	exit;
  end;
  min:=1000001;
  t0 := (t - t1) / (t2 - t);
  {if min > f(0,x2) then begin
    min:= f(0,x2);
    miny1:= 0;
    miny2:=x2;
  end;}
  miny1:=-1;
  for y1:=x1 downto 1 do begin
      y2:= round (y1 * t0);
      check (y1,y2-1);
      check (y1,y2);
      check (y1,y2+1);
  end;
  if miny1 = -1 then if t1 < t2 then begin
    miny1:=0;
  	miny2:=x2;
  end else begin
    miny2:=x2;
    miny1:=x1;
  end;
  write (miny1,' ',miny2);
end.

var
  t1,t2,x1,x2,t0,minx,minf,f,min,x : longint;
  px,tx,mint,fx : extended;

  function _round(x : extended) : longint;
  begin
    if (frac(x)>=0.5) then _round:=trunc(x)+1
                      else _round:=trunc(x);
  end;

begin
  {assign(input,'input.txt'); reset(input);
  assign(output,'output.txt'); rewrite(output);}
  readln(t1,t2,x1,x2,t0);
  min:=-maxlongint;
  mint:=maxlongint;
  for x:=1 to x1 do begin
    px:=(t0*x-t1*x)/(t2-t0);
    if (px<=x2) and (px>=0)
      then begin
        f:=_round(px);
        tx:=(t1*x+t2*f)/(x+f);
        if (tx-t0<0) then fx:=t0-tx else fx:=tx-t0;
        if (x+f>min) and (fx<=mint) and (tx>=t0)  then begin
          minx:=x; minf:=f; min:=x+f; mint:=fx;
        end;
      end;
  end;
  writeln(minx,' ',minf);
  close(input); close(output);
end.

program pr1;

{$APPTYPE CONSOLE}

{type int64=longint; }
const
 eps=1e-13;  nnn=2000000;
 label 1;
var t1,t2,x1,x2,y1,y2,t0,nn,ot,mmax,w,t,kol,i,j,m,k,imax,p,h,jj:longint;
n,s,step2:int64;
blizt:array[0..2000000,-1..2] of double;
minotkl:double; y1bl,ibl,y2bl:longint;

flag,flagggg:boolean;
ott:double;
function min (a,b:longint):longint;begin min:=b;if a<b then min:=a;  end;
function max (a,b:longint):longint;begin max:=b;if a>b then max:=a;  end;

function nod(a,b:longint):longint; var p,t:longint;
begin if (a>0)and(b>0) then
   begin while (b>0) do begin t:=a mod b;a:=b;b:=t;    end;
    p:=a;
   end else if a=0 then p:=b else p:=a;
nod:=p;
end;

function pr(n:longint):boolean; var i,j:longint;flag:boolean;
 begin  flag:=true;
      for i:=2 to n-1 do if n mod i=0 then flag:=false;
   pr:=flag;
 end;

begin
{assign (input,'input.txt');reset(input);
      assign (output,'output.txt'); rewrite(output);
}read(t1,t2,x1,x2,t0);
if (t1=t0)and(t2=t0) then begin  writeln(x1,' ',x2);goto 1;  end;
if (t1=t0)and(t2>t0) then begin  writeln(x1,' ',0);goto 1;  end;
if (t1<t0)and(t2=t0) then begin  writeln(0,' ',x2);goto 1;  end;
  for y2:=0 to x2 do
begin
  y1:=trunc(y2*(t0-t2)/(t1-t0)); {writeln(y2,' ',y1); }
   for i:=-1 to 2 do
   if (y1+i+y2<>0)and(y1+i<x1) then blizt[y2,i]:=(t1*(y1+i)+t2*y2)/(y1+i+y2)
   else blizt[y2,i]:=100000000000;
end;

{ for y2:=0 to x2 do
 begin write(y2,'   '); for i:=-1 to 2 do write(blizt[y2,i]:0:3,' ');writeln;  end;
}

minotkl:=100000000;
 for y2:=0 to x2 do for i:=-1 to 2 do
   begin   y1:=trunc(y2*(t0-t2)/(t1-t0));
    if ((y1+i)<=x1)and(blizt[y2,i]>=t0-eps)and (abs(blizt[y2,i]-t0)<=minotkl) then
        begin
          y2bl:=y2;
          ibl:=i;minotkl:=abs(blizt[y2,i]-t0) ;
          y1bl:=y1+i;
          {writeln('ttt ',y2,' ',y1); }
        end;

   end;
writeln(y2bl,' ',y1bl);

   1:   close(output);
end.

uses math;
var t1,t2:int64;
l,r,c,ay1,ay2,y1,y2,x1,x2:longint;
rr,t0,r1,r2:extended;
  begin
   readln(t1,t2,x1,x2,t0);

   rr:=1000000000000000000.0;

   if (t0=t1)and(t2=t0) then
     begin
      writeln(x1,' ',x2);
      halt(0);
     end;
   if (t0=t1) then
     begin
      writeln(x1,' ',0);
      halt(0);
     end;
   if (t0=t2) then
     begin
      writeln(0,' ',x2);
      halt(0);
     end;

   for y1:=0 to x1 do
     begin
      if y1=0 then
        begin
         rr:=t2;
         ay1:=0;
         ay2:=y2;
        end;

      l:=0;
      if y1=0 then l:=1;

      r:=x2;

      while l+1<r do
        begin
         c:=(l+r)div 2;
         r1:=(t1*y1+t2*c)/(y1+c);
         if r1>=t0-0.000000000001 then r:=c else l:=c;
        end;
      r1:=(t1*y1+t2*l)/(y1+l);
      if r1>=t0-0.00000000001 then
        begin
         if abs(r1-rr)<0.0000000001 then
           begin
            if ay1+ay2<y1+l then
              begin
               ay1:=y1;
               ay2:=l;
              end;
           end else

         if r1<rr then
           begin
            rr:=r1;
            ay1:=y1;
            ay2:=l;
           end;
        end;

      r1:=(t1*y1+t2*r)/(y1+r);
      if r1>=t0-0.00000000001 then
        begin
         if abs(r1-rr)<0.0000000001 then
           begin
            if ay1+ay2<y1+r then
              begin
               ay1:=y1;
               ay2:=r;
              end;
           end else
         if r1<rr then
           begin
            rr:=r1;
            ay1:=y1;
            ay2:=r;
           end
        end;
     end;
   writeln(ay1,' ',ay2);
  end.

PROGRAM C93;
uses  math;
const esp = 0.00000000001;
var x1, x2, y1, y2, n, t1, t2, t0 : int64;
    res : double;

procedure slove;
var i : longint; j : int64;
begin
   if (t1 = t0) then y1:= x1;
   if (t2 = t0) then y2:= x2;
   if (t1 = t0) or (t2 = t0) then exit;
   res:= maxlongint;
   for i:= 0 to x1 do
      begin
         if i = 0 then j:= x2 else j:= trunc(((t0 - t1) / (t2 - t0)) * i + 0.999999999);
         if (j <= x2) and ((i + j) <> 0) and (res > (t1 * i + t2 * j) / (i + j) - t0) or (abs(res + t0 -  (t1 * i + t2 * j) / (i + j)) < esp) then
            begin
               y1:= i;
               y2:= j;
               res:= (t1 * i + t2 * j) / (i + j) - t0
            end;
      end;
end;

BEGIN
   readln(t1, t2, x1, x2, t0);
   slove;
   writeln(y1, ' ', y2);
END.

var  i:longint;
     x1,x2,t1,t2,t:int64;
     tt,t1m,t2m:int64;
     mnt,nt:real;
begin
 readln(t1,t2,x1,x2,t);

 if (t=t2) and (t=t1) then
  begin

    writeln(x1,'dfg ',x2);
    halt;
  end;

  if t2<>t then
  begin

 for i:=x1 downto 0 do
  begin
    if trunc(i*(t-t1)/(t2-t))<>i*(t-t1)/(t2-t) then tt:=trunc(i*(t-t1)/(t2-t))+1
     else tt:=trunc(i*(t-t1)/(t2-t));
    if tt+i=0 then continue;
    if tt>x2 then tt:=x2;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or ((nt>=t) and (abs(nt-t)=abs(mnt-t)) and ((i+tt)>t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
     tt:=tt+1;
     if tt+i=0 then continue;
    if tt>x2 then tt:=x2;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or ((nt>=t) and (abs(nt-t)=abs(mnt-t)) and ((i+tt)>t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
     tt:=tt-2;
     if tt+i=0 then continue;
    if tt>x2 then tt:=x2;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or ((nt>=t) and (abs(nt-t)=abs(mnt-t)) and ((i+tt)>t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
  end;
  writeln(t1m,' ',t2m);
   end else
    begin
    tt:=x2;
    x2:=x1;
    x2:=tt;

    tt:=t1;
    t1:=t2;
    t2:=tt;
    for i:=x1 downto 0 do
  begin
    if trunc(i*(t-t1)/(t2-t))<>i*(t-t1)/(t2-t) then tt:=trunc(i*(t-t1)/(t2-t))+1
     else tt:=trunc(i*(t-t1)/(t2-t));
    if tt+i=0 then continue;
    if tt>x2 then tt:=x2;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or ((nt>=t) and (abs(nt-t)=abs(mnt-t)) and ((i+tt)>t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
     tt:=tt+1;

    if tt>x2 then tt:=x2;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or ((nt>=t) and (abs(nt-t)=abs(mnt-t)) and ((i+tt)>t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
    tt:=tt-2;

    if tt>x2 then tt:=x2;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or ((nt>=t) and (abs(nt-t)=abs(mnt-t)) and ((i+tt)>t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
  end;
    writeln(t2m,' ',t1m);
    end;

end.

program shablon;

{$MODE OBJFPC}{$H+}
{$O+ R-  Q-} {$ASSERTIONS ON} {$INLINE ON}
{$COperators ON}

uses
   SysUtils,
   Math;

const inf = 1 / 0;

procedure pout;
begin

    {$IFNDEF ONLINE_JUDGE}
    close(input);
    close(output);
    {$ENDIF}
    halt(0);
end;

procedure pinit;
begin
    {$IFNDEF ONLINE_JUDGE}
    assign(input, 'input.txt');
    assign(output, 'output.txt');
    reset(input);
    rewrite(output);
    {$ENDIF}

end;

procedure solve;
var t1, t2, x1, x2, t0 : int64;
    t, tt : extended;
    y, yy, y1, y2 : longint;
begin
    read(t1, t2, x1, x2, t0);
    y1 := 0;
    y2 := 0;
    if (t1 = t0) or (t2 = t0) then begin
        if (t1 = t0) then begin
            y1 := x1;
        end;
        if (t2 = t0) then begin
            y2 := x2;
        end;
        writeln(y1, ' ', y2);
        halt(0);
    end;
    y1 := 0;
    y2 := 0;
    t := inf;
    for y := 0 to x1 do begin
        yy := (t0 - t1) * y div (t2 - t0);
        if (t0 - t1) * y mod (t2 - t0) > 0 then begin
            inc(yy);
        end;
        if yy + y = 0 then inc(yy);
        if (yy + y > 0) and (yy <= x2) then begin
            //tt := (y * t1 + yy * t2) / (yy + y);
            tt := (y / (yy + y)) * t1 + (yy/(yy + y)) * t2;
            if tt >= t0 then begin
                if tt = t then begin
                    if (y + yy) > (y1 + y2) then begin
                        y1 := y;
                        y2 := yy;
                        t := tt;
                    end;
                end
                else if tt < t then begin
                    y1 := y;
                    y2 := yy;
                    t := tt;
                end;
            end;
        end;
    end;
    for yy := 0 to x2 do begin
        y := (t2 - t0) * yy div (t0 - t1);
        if (t2 - t0) * yy mod (t0 - t1) > 0 then begin
            inc(y);
        end;
        if yy + y = 0 then inc(y);
        if (y + yy > 0) and (y <= x1) then begin
//            tt := (y * t1 + yy * t2) / (yy + y);
            tt := (y / (yy + y)) * t1 + (yy/(yy + y)) * t2;
            if (tt >= t0) then begin
                if tt = t then begin
                    if (y + yy) > (y1 + y2) then begin
                        y1 := y;
                        y2 := yy;
                        t := tt;
                    end;
                end
                else if tt < t then begin
                    y1 := y;
                    y2 := yy;
                    t := tt;
                end;
            end;
        end;
    end;
    writeln(y1, ' ', y2);
end;

begin
    pinit;
    solve;
    pout;
end.

var
     i,x1,x2,t1,t2,t:longint;
     tt,t1m,t2m:longint;
     mnt,nt:real;
begin
 readln(t1,t2,x1,x2,t);

 if t=t2 then
  begin
    writeln(0,' ',x2);
    halt;
  end;

 for i:=x1 downto 0 do
  begin
    tt:=round(i*(t-t1)/(t2-t));
    if tt+i=0 then continue;
    if tt>x2 then tt:=x2;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or ((nt>=t) and (abs(nt-t)=abs(mnt-t)) and ((i+tt)>t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
  end;

writeln(t1m,' ',t2m);
end.

{$APPTYPE CONSOLE}
{$MAXSTACKSIZE $11000000}
{$R-,Q-,S+,O-}
const
  eps = 1e-11;
var
  x1, y1, x2, ans1, Ans2, y2, t1,t2, t0 : Int64;
  i : longint;
function eq(x, y : extended) : Boolean;
begin
  result := y - x > eps;
end;
function neq(x, y : extended) : boolean;
begin
  result := (x - y < eps) and (y - x < eps);
end;
begin
  //reset(input, 'input.txt');
  //rewrite(output, 'output.txt');
  Readln(t1, t2, x1, x2, t0);
  if t2 = t0 then
    begin
      Writeln(0, ' ', x2);
      exit;
    end;
  ans1 := -1;
  Ans2 := -1;
  for i := 0 to x1 do
    begin
      y1 := i;
      y2 := ((y1 * (t0 - t1)) div (t2 - t0  ));
      if y1 + y2 = 0 then
        Continue;
      if (t1 * y1 + t2 * y2) div (y1 + y2) < t0 then
        inc(y2);
      if (ans1 = -1) or (eq((t1 * y1 + t2 * y2) / (y1 + y2), (t1 * Ans1 + t2 * ans2) / (ans1 + ans2))) or (neq((t1 * y1 + t2 * y2) / (y1 + y2), (t1 * Ans1 + t2 * ans2) / (ans1 + ans2))) and (y1 + y2 > ans1 + ans2) then
        begin
          ans1 := y1;
          ans2 := y2;
        end;
    end;
  writeln(ans1, ' ', ans2);
end.

var  i:longint;
     x1,x2,t1,t2,t:int64;
     tt,t1m,t2m:int64;
     mnt,nt:real;
begin
 readln(t1,t2,x1,x2,t);

 if (t=t2) and (t=t1) then
  begin

    writeln(x1,' ',x2);
    halt;
  end;
mnt:=-10000000 ;
  if t2<>t then
  begin

 for i:=x1 downto 0 do
  begin
    if trunc(i*(t-t1)/(t2-t))<>i*(t-t1)/(t2-t) then tt:=trunc(i*(t-t1)/(t2-t))+1
     else tt:=trunc(i*(t-t1)/(t2-t));
    if tt+i=0 then continue;
    if tt>x2 then tt:=x2;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or ((nt>=t)
    and (abs(nt-t)=abs(mnt-t)) and ((i+tt)>t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
  end;
  writeln(t1m,' ',t2m);
   end else
    begin
    tt:=x2;
    x2:=x1;
    x2:=tt;

    tt:=t1;
    t1:=t2;
    t2:=tt;
    for i:=x1 downto 0 do
  begin
    if trunc(i*(t-t1)/(t2-t))<>i*(t-t1)/(t2-t) then tt:=trunc(i*(t-t1)/(t2-t))+1
     else tt:=trunc(i*(t-t1)/(t2-t));
    if tt+i=0 then continue;
    if tt>x2 then tt:=x2;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or ((nt>=t) and (abs(nt-t)=abs(mnt-t)) and ((i+tt)>t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
  end;
    writeln(t2m,' ',t1m);
    end;

end.

const
    fi='';
    fo='';
var
    f:Text;
    res1,res2,y1,y2,t1,t2,x1,x2,t0:longint;
procedure nhap;
begin
    assign(f,fi);
    reset(f);
    readln(f,t1,t2,x1,x2,t0);
    close(f);
end;
procedure xuat;
begin
    assign(f,fo);
    rewrite(f);
    writeln(res1,' ',res2);
    close(f);
end;
procedure process;
var z,tmin:real;i1,i2:longint;
begin
    if t1=t0 then
     begin
        res1:=x1;
        res2:=0;
        exit;
     end;
    z:=(t0-t2)/(t1-t0);
    if x1>z*x2 then
     begin
        y1:=x2;
        y2:=x2;
     end
    else
     begin
        y1:=x1;
        y2:=x2;
     end;
    res1:=0;
    res2:=0;
    tmin:=maxlongint;
    for i2:=y2 downto 1 do
     begin
        i1:=trunc(i2*z);
        if i1<=x1 then
        if (t1*i1+t2*i2)/(i1+i2)>=t0 then
         begin
            if abs((t1*i1+t2*i2)/(i1+i2)-tmin)<0.0000001 then
             begin
                if (i1+i2)>(res1+res2) then
                 begin
                   res1:=i1;
                   res2:=i2;
                 end;
             end
            else
            if (t1*i1+t2*i2)/(i1+i2)<tmin then
             begin
                tmin:=(t1*i1+t2*i2)/(i1+i2);
                res1:=i1;
                res2:=i2;
             end;
         end;
     end;
end;
begin
    nhap;
    process;
    xuat;
end.

var lx,ly,t1,t2,x1,x2,t,i,v,y:int64;
    j:longint;
    lt,min,max:extended;
 begin
  //assign(input,'input.txt');
  //reset(input);
  //assign(output,'output.txt');
  //rewrite(output);
  read(t1,t2,x1,x2,t);
  if t1=t then begin
                writeln(x1,' ',0);
                halt;
               end
          else
  if t2=t then begin
                writeln(0,' ',x2);
                halt;
               end;
  min:=maxlongint;
  max:=0;
  for j:=0 to x1 do
   begin
    i:=j;
    if i=0 then begin
                 y:=x2;
                 lt:=t2;
                 if lt>=t then

                 if (abs(lt-t)<min) or
                   ((abs(lt-t)=min) and
                    (y>max)) then begin
                                   min:=abs(lt-t);
                                   max:=y;

                                   lx:=0;
                                   ly:=y;
                                  end;
                end
           else begin
                 v:=i*(t1-t);
                 if v mod (t-t2)>0 then begin
                                         y:=v div (t-t2);
                                         if y>x2 then y:=x2
                                                 else
                                         if y<=0 then y:=0;

                                         if i+y> 0 then begin
                                                         lt:=(t1*i+t2*y)/(i+y);

                                                         if lt>=t then

                                                         if (abs(lt-t)<min) or
                                                           ((abs(lt-t)=min) and
                                                            (i+y>max)) then begin
                                                                             min:=abs(lt-t);
                                                                             max:=i+y;

                                                                             lx:=i;
                                                                             ly:=y;
                                                                            end;
                                                        end;

                                         y:=v div (t-t2)+1;
                                         if y>x2 then y:=x2
                                                 else
                                         if y<=0 then y:=0;

                                         if i+y> 0 then begin
                                                         lt:=(t1*i+t2*y)/(i+y);

                                                         if lt>=t then

                                                         if (abs(lt-t)<min) or
                                                           ((abs(lt-t)=min) and
                                                            (i+y>max)) then begin
                                                                             min:=abs(lt-t);
                                                                             max:=i+y;

                                                                             lx:=i;
                                                                             ly:=y;
                                                                            end;
                                                        end;

                                        end
                                   else begin
                                         y:=v div (t-t2);
                                         if y>x2 then y:=x2
                                                 else
                                         if y<=0 then y:=0;

                                         if i+y>0 then begin
                                                        lt:=(t1*i+t2*y)/(i+y);

                                                        if lt>=t then

                                                        if (abs(lt-t)<min) or
                                                          ((abs(lt-t)=min) and
                                                           (i+y>max)) then begin
                                                                            min:=abs(lt-t);
                                                                            max:=i+y;

                                                                            lx:=i;
                                                                            ly:=y;
                                                                           end;
                                                        end;
                                         y:=v div (t-t2)+1;

                                         if y>x2 then y:=x2
                                                 else
                                         if y<=0 then y:=0;

                                         if i+y>0 then begin
                                                        lt:=(t1*i+t2*y)/(i+y);

                                                        if lt>=t then

                                                        if (abs(lt-t)<min) or
                                                          ((abs(lt-t)=min) and
                                                           (i+y>max)) then begin
                                                                            min:=abs(lt-t);
                                                                            max:=i+y;

                                                                            lx:=i;
                                                                            ly:=y;
                                                                           end;
                                                        end;
                                        end;
                end;
   end;

  writeln(lx,' ',ly);
  //close(input);
  //close(output);
 end.

program Project5;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type dr = record
  chic, znam: int64;
end;
var
  x1, x2, t1, t2, t0, y1, y2, y1t, y2t: longint;
  y2dr, ttek, tmin: dr;
function nod(a, b: int64): int64;
begin
  if (a = 0) or (b = 0) then
  begin
    nod := a + b;
    exit;
  end;

  nod := nod(b, a mod b);
end;

procedure cokr(var a: dr);
var
  d: int64;
begin
  d := nod(a.chic, a.znam);
  a.chic := a.chic div d;
  a.znam := a.znam div d;
end;

function okrverh(a: dr): int64;
begin
  if a.znam = 1 then
    okrverh := a.chic
  else
    okrverh := (a.chic div a.znam) + 1;
end;

function temp(y1, y2: longint): dr;
var
  res: dr;
begin
  res.chic := int64(y1) * t1 + int64(y2) * t2;
  res.znam := y1 + y2;
  cokr(res);
  temp := res;
end;

function ravn(a, b: dr): boolean;
begin
  if (a.chic = b.chic) and (a.znam = b.znam) then
    ravn := true
  else
    ravn := false;
end;
function bolsh(a, b: dr): boolean;
begin
  if a.chic = -1 then
  begin
    bolsh := true;
    exit;
  end;
  if (a.chic * b.znam - b.chic * a.znam) > 0 then
    bolsh := true
  else
    bolsh := false;
end;
begin
 { assign(input, 'input.txt');
  reset(input);
  assign(output, 'output.txt');
  rewrite(output);    }
  readln(t1, t2, x1, x2, t0);
  if t0 >= t2 then
  begin
    writeln(0, ' ', x2);
    exit;
  end;

  if t0 <= t1 then
  begin
    writeln(x1, ' ', 0);
    exit;
  end;

  tmin.chic := -1;
  tmin.znam := 1;
  for y1 := 1 to x1 do
  begin
    y2dr.chic := y1 * (t0 - t1);
    y2dr.znam := t2 - t0;
    cokr(y2dr);
    y2 := okrverh(y2dr);
    if y2 > x2 then
      break;

    ttek:= temp(y1, y2);
    if ravn(ttek, tmin) and (y1 + y2 > y1t + y2t) then
    begin
      tmin := ttek;
      y1t := y1;
      y2t := y2;
    end;

    if bolsh(tmin, ttek) then
    begin
      tmin := ttek;
      y1t := y1;
      y2t := y2;
    end;
  end;
  if tmin.chic = -1 then
  begin
    writeln(0, ' ', x2);
    exit;
 end;
  writeln(y1t, ' ', y2t);
end.

    const
        fi='';
        fo='';
        oo=1000000000000000;
    var
        f:Text;
        res1,res2,y1,y2,t1,t2,x1,x2,t0:int64;
    procedure nhap;
    begin
       assign(f,fi);
       reset(f);
       readln(f,t1,t2,x1,x2,t0);
       close(f);
   end;
   procedure xuat;
   begin
       assign(f,fo);
       rewrite(f);
       writeln(res1,' ',res2);
       close(f);
   end;
   procedure process;
   var tmin,z:extended;i1,i2:int64;
   begin
       if (t1=t0) and (t2=t0) then
        begin
           res1:=x1;
           res2:=x2;
           exit;
        end;
       if t1=t0 then
        begin
           res1:=x1;
           res2:=0;
           exit;
        end;
       z:=(t0-t2)/(t1-t0);
       if x1>z*x2 then
        begin
           y1:=x2;
           y2:=x2;
        end
       else
        begin
           y1:=x1;
           y2:=x2;
        end;
       res1:=0;
       res2:=0;
       tmin:=oo;
       i2:=y2;
       while i2>=1 do
        begin
           i1:=trunc(i2*z);
           if i1>x1 then i1:=x1;
           if (t1*i1+t2*i2)/(i1+i2)>=t0 then
            begin
               if abs((t1*i1+t2*i2)/(i1+i2)-tmin)<0.0000001 then
                begin
                   if (i1+i2)>(res1+res2) then
                    begin
                      res1:=i1;
                      res2:=i2;
                    end;
                end
               else
               if (t1*i1+t2*i2)/(i1+i2)<tmin then
                begin
                   tmin:=(t1*i1+t2*i2)/(i1+i2);
                   res1:=i1;
                   res2:=i2;
                end;
            end;
           dec(i2);
        end;
   end;
   begin
       nhap;
       process;
       xuat;
   end.

var  i:longint;
     x1,x2,t1,t2,t:int64;
     tt,t1m,t2m:int64;
     mnt,nt:real;

     begin
 readln(t1,t2,x1,x2,t);

 mnt:=-10000000;
 if (t=t2) and (t=t1) then
  begin

    writeln(x1,' ',x2);
    halt;
  end;
   if t<>t1 then
   begin
    for i:=x2 downto 0 do
     begin
       if (i*(t2-t)/(t-t1)<>trunc(i*(t2-t)/(t-t1))) then
         tt:= trunc(i*(t2-t)/(t-t1))+1 else
          tt:=trunc(i*(t2-t)/(t-t1));
         if (tt+i=0) or (tt<0) then continue;
         if tt>x1 then continue;
         nt:=((t1*tt)+(t2*i))/(tt+i);
         if((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or
    ((nt>=t) and (abs(abs(nt-t)-abs(mnt-t))=0) and ((i+tt)>=t1m+t2m)) then
     begin
      t1m:=tt;
      t2m:=i;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;

     tt:=tt-1;
     if (tt+i=0) or (tt<0) then continue;
    if tt>x2 then continue;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or
    ((nt>=t) and (abs(abs(nt-t)-abs(mnt-t))=0) and ((i+tt)>=t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;

     tt:=tt+2;
     if (tt+i=0) or (tt<0) then continue;
    if tt>x2 then continue;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or
    ((nt>=t) and (abs(abs(nt-t)-abs(mnt-t))=0) and ((i+tt)>=t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
    end;
     end;
  if t2<>t then
  begin

 for i:=x1 downto 0 do
  begin
    if (i*(t-t1)/(t2-t))<>i*(t-t1)/(t2-t) then tt:=trunc(i*(t-t1)/(t2-t))+1
     else tt:=trunc(i*(t-t1)/(t2-t));
    if (tt+i=0) or (tt<0) then continue;
    if tt>x2 then continue;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or
    ((nt>=t) and (abs(abs(nt-t)-abs(mnt-t))=0) and ((i+tt)>=t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
     tt:=tt-1;
     if (tt+i=0) or (tt<0) then continue;
    if tt>x2 then continue;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or
    ((nt>=t) and (abs(abs(nt-t)-abs(mnt-t))=0) and ((i+tt)>=t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
     tt:=tt+2;
     if (tt+i=0) or (tt<0) then continue;
    if tt>x2 then continue;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or
    ((nt>=t) and (abs(abs(nt-t)-abs(mnt-t))=0) and ((i+tt)>=t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
  end;

   end;

   writeln(t1m,' ',t2m);
end.

{$r-,q-,s-,o+}
{$IFNDEF ONLINE_JUDGE}
{$o-,r+,q+,s-}
{$ENDIF}
{$M 16777216}
program TASK_3;

uses
  SysUtils,
  math;
var i,x1,x2:integer;
    min,ansx,ansy,t1,t2,t0,x,xx:int64;getted:extended;

begin
 {$IFNDEF ONLINE_JUDGE}
   assign(input, 'input.txt');reset(input);
   assign(output, 'output.txt');rewrite(output);
 {$ENDIF}min:=0;
  readln(t1,t2,x1,x2,t0);getted:=10000000000000;
  if (t1=t2)and(t2=t0) then begin writeln(x1,' ',x2); halt(0); end;
  if t1=t0 then begin writeln(x1,' ',0);halt(0); end;
  if t2=t0 then begin writeln(0,' ',x2); halt(0); end;
  for i:=0 to x1 do
   begin
     x:=(t0*i-t1*i) div (t2-t0);
     if (t0*i-t1*i) mod (t2-t0) <> 0 then inc(x);
     if (x+i<>0)and(x<=x2)and((t1*i+t2*x)/(x+i)-t0<=getted) then begin getted:=(t1*i+t2*x)/(x+i)-t0; min:=x+i; ansX:=x;ansy:=i; end;
  end;
 writeln(ansY, ' ' ,ansX);
end.

var  i:longint;
     x1,x2,t1,t2,t:int64;
     tt,t1m,t2m:int64;
     mnt,nt:real;
begin
 readln(t1,t2,x1,x2,t);

 if (t=t2) and (t=t1) then
  begin

    writeln(x1,' ',x2);
    halt;
  end;

  if t2<>t then
  begin

 for i:=x1 downto 0 do
  begin
    tt:=round(i*(t-t1)/(t2-t));
    if tt+i=0 then continue;
    if tt>x2 then tt:=x2;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or ((nt>=t) and (abs(nt-t)=abs(mnt-t)) and ((i+tt)>t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
  end;
  writeln(t1m,' ',t2m);
   end else
    begin
    tt:=x2;
    x2:=x1;
    x2:=tt;
    tt:=t1;
    t1:=t2;
    t2:=tt;
    for i:=x1 downto 0 do
  begin
    tt:=round(i*(t-t1)/(t2-t));
    if tt+i=0 then continue;
    if tt>x2 then tt:=x2;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or ((nt>=t) and (abs(nt-t)=abs(mnt-t)) and ((i+tt)>t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
  end;
    writeln(t2m,' ',t1m);
    end;

end.

var  i:longint;
     x1,x2,t1,t2,t:int64;
     tt,t1m,t2m:int64;
     mnt,nt:real;
begin
 readln(t1,t2,x1,x2,t);

 if (t=t2) and (t=t1) then
  begin

    writeln(x1,' ',x2);
    halt;
  end;

  if t2<>t then
  begin

 for i:=x1 downto 0 do
  begin
    if trunc(i*(t-t1)/(t2-t))<>i*(t-t1)/(t2-t) then tt:=trunc(i*(t-t1)/(t2-t))+1
     else tt:=trunc(i*(t-t1)/(t2-t));
    if tt+i=0 then continue;
    if tt>x2 then tt:=x2;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or ((nt>=t) and (abs(nt-t)=abs(mnt-t)) and ((i+tt)>t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
  end;
  writeln(t1m,' ',t2m);
   end else
    begin
    tt:=x2;
    x2:=x1;
    x2:=tt;

    tt:=t1;
    t1:=t2;
    t2:=tt;
    for i:=x1 downto 0 do
  begin
    if trunc(i*(t-t1)/(t2-t))<>i*(t-t1)/(t2-t) then tt:=trunc(i*(t-t1)/(t2-t))+1
     else tt:=trunc(i*(t-t1)/(t2-t));
    if tt+i=0 then continue;
    if tt>x2 then tt:=x2;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or ((nt>=t) and (abs(nt-t)=abs(mnt-t)) and ((i+tt)>t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
  end;
    writeln(t2m,' ',t1m);
    end;

end.

const
{     fi='hot.inp';
     fo='hot.out';}
     fi='';
     fo='';
     maxn=1;
     eps=1e-9;

var
     f:text;
     a:array[0..maxn]of longint;
     n:longint;
     t1,t2,t0,x1,x2,t:int64;

function maxx(x,y:longint):longint;
begin
     maxx:=x;
     if y>x then maxx:=y;
end;

function minn(x,y:longint):longint;
begin
     minn:=x;
     if y<x then minn:=y;
end;

procedure swap(var x,y:longint);
var  z:longint;
begin
     z:=x;
     x:=y;
     y:=z;
end;

procedure qsort(l,r:longint);
var  tmp,mid,i,j:longint;
begin
     if l>=r then exit;
     i:=l;j:=r;
     mid:=a[(l+r) div 2];
     repeat
          while a[i]<mid do inc(i);
          while a[j]>mid do dec(j);
          if i<=j then
          begin
               swap(a[i],a[j]);
               inc(i);
               dec(j);
          end;
     until i>j;
     qsort(l,j);
     qsort(i,r);
end;

procedure open;
var  i:longint;
begin
     assign(f,fi);reset(f);
     readln(f, t1, t2, x1, x2 , t0);
     close(f);
end;

procedure main;
var  xopt,yopt,y,max:int64;
     x:longint;
     gt,tt,yy,kq:double;
begin
     assign(f,fo);rewrite(f);
     if t2=t0 then
     begin
          if t1=t0 then writeln(f,x1,' ',x2)
          else writeln(f,0,' ',x2);
          exit;
     end;
     tt:=(t0-t1)/(t2-t0);
     max:=0;
     kq:=1e15;
     for x:=0 to x1 do
     begin
          yy:=x*tt;
          if yy-trunc(yy)<=eps then y:=trunc(yy)
          else y:=trunc(yy)+1;
          y:=minn(y,x2);
          if x+y=0 then continue;
          gt:=(x*t1+y*t2)/(x+y);
          if (abs(gt-t0)<kq) or ((abs(gt-t0-kq)<eps) and (x+y>max)) then
          begin
               kq:=gt-t0;
               max:=x+y;
               xopt:=x;
               yopt:=y;
          end;
     end;

     writeln(f,xopt,' ',yopt);
end;

begin
     open;
     main;
     close(f);
end.

const
        fi='';
var
        f:text;
        t1,t2,x1,x2,t0,ra1,ra2:longint;
        tmp:real;
procedure nhap;
begin
        assign(f,fi);
        reset(f);
        readln(f,t1,t2,x1,x2,t0);
        close(f);
end;
procedure xuly;
var
        u,v,x,q:real;
        i,k:longint;
begin
        u:=(t0-t1)/(t2-t0);
        tmp:=1000000000;
        for i:=1 to x1 do
        begin
                v:=i*u;
                q:=v;
                v:=trunc(v);
                if v<=x2 then
                begin
                        k:=trunc(v);
                        x:=(t1*i+t2*k)/(k+i);
                        if x>=t0 then
                        begin
                        if x<tmp then
                        begin
                                ra1:=i;
                                ra2:=k;
                                tmp:=x;
                        end
                        else
                        if x=tmp then
                        begin
                                if (i+k)>(ra1+ra2) then
                                begin
                                        ra1:=i;
                                        ra2:=k;
                                end;
                        end;
                        end;
                end;
                if q>trunc(q) then
                begin
                v:=trunc(q)+1;
                if v<=x2 then
                begin
                        k:=trunc(v);
                        x:=(t1*i+t2*k)/(k+i);
                        if x<t0 then continue;
                        if x<tmp then
                        begin
                                ra1:=i;
                                ra2:=k;
                                tmp:=x;
                        end
                        else
                        if x=tmp then
                        begin
                                if (i+k)>(ra1+ra2) then
                                begin
                                        ra1:=i;
                                        ra2:=k;
                                end;
                        end;
                end;
                end;
        end;
        writeln(ra1,' ',ra2);
end;
begin
        nhap;
        xuly;
end.

{$O-}
Uses Math;
const eps = 1e-9;
var
	x1, x2, ans, y2, y1, res, i, n, ai, bi, l, r, m: longint;
        t1, t2, t, otv, gr: extended;

begin
	{$ifndef online_judge}
        reset(input, 'a.in');
        rewrite(output, 'a.out');
        {$endif}
        readln(t1, t2, x1, x2, t);
        otv := 1e12;
        res := -maxlongint;
        ai := 0; bi := 0;
        for i := x1 downto 0 do begin
        	y1 := i;
        	l := 0; r := x2; ans := 0;
        	while (l <= r) do begin
        		m := (l + r) shr 1;
            		if (y1 + m = 0) then gr := 0 else
        		gr := (t1 * y1 + t2 * m) / (y1 + m);
        		if gr >= t then begin
        			ans := 1;
        			y2 := m;
        	      	end;
        		if gr < t then l := m + 1 else r := m - 1;
            	end;
            	if (ans > 0) then gr := (t1 * y1 + t2 * y2) / (y1 + y2);
            	if (ans > 0) and ((otv - abs(gr - t) > 0) or ((abs(gr - t - otv) < eps) and (y1 + y2 < res))) then begin
            		otv := abs(gr - t);
            		res := y1 + y2;
            		ai := y1;
            		bi := y2;
             	end;
   	end;
   	writeln(ai, ' ', bi);
end.

program cf126a;
const eps=1e-7;
var
  n,i,j,y1:longint;
  an1,an2,y2,t1,t2,x1,x2,t0,dd:int64;
  ans,d:double;
begin
  readln(t1,t2,x1,x2,t0);
  if t2=t0 then begin
    writeln(0,' ',x2);
    halt;
  end;

  ans:=1e50;
  for y1:=x1-1 downto 1 do begin
    d:=(t0*y1-t1*y1)/(t2-t0);
    y2:=trunc(d);
    if y2<d-eps then inc(y2);
    if y2<=x2 then begin
      d:=(t1*y1+t2*y2)/(y1+y2);
      if d<ans-eps then begin
        an1:=y1;
        an2:=y2;
        ans:=d;
      end;
    end;
  end;
  if t2<ans-eps then begin
    an1:=0;
    an2:=x2;
  end;

  writeln(an1,' ',an2);
end.

var  i:longint;
     x1,x2,t1,t2,t:int64;
     tt,t1m,t2m:int64;
     mnt,nt:real;

     begin
 readln(t1,t2,x1,x2,t);

 mnt:=-10000000;
 if (t=t2) and (t=t1) then
  begin

    writeln(x1,' ',x2);
    halt;
  end;
   if t<>t1 then
   begin
    for i:=x2 downto 0 do
     begin
       if (i*(t2-t)/(t-t1)<>trunc(i*(t2-t)/(t-t1))) then
         tt:= trunc(i*(t2-t)/(t-t1))+1 else
          tt:=trunc(i*(t2-t)/(t-t1));
         if (tt+i=0) or (tt<0) then continue;
         if tt>x1 then continue;
         nt:=((t1*tt)+(t2*i))/(tt+i);
         if((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or
    ((nt>=t) and (abs(abs(nt-t)-abs(mnt-t))=0) and ((i+tt)>=t1m+t2m)) then
     begin
      t1m:=tt;
      t2m:=i;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;

     tt:=tt-1;
     if (tt+i=0) or (tt<0) then continue;
    if tt>x2 then continue;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or
    ((nt>=t) and (abs(abs(nt-t)-abs(mnt-t))=0) and ((i+tt)>=t1m+t2m)) then
     begin
      t1m:=tt;
      t2m:=i;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;

     tt:=tt+2;
     if (tt+i=0) or (tt<0) then continue;
    if tt>x2 then continue;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or
    ((nt>=t) and (abs(abs(nt-t)-abs(mnt-t))=0) and ((i+tt)>=t1m+t2m)) then
     begin
      t1m:=tt;
      t2m:=i;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
    end;
     end;
  if t2<>t then
  begin

 for i:=x1 downto 0 do
  begin
    if (i*(t-t1)/(t2-t))<>i*(t-t1)/(t2-t) then tt:=trunc(i*(t-t1)/(t2-t))+1
     else tt:=trunc(i*(t-t1)/(t2-t));
    if (tt+i=0) or (tt<0) then continue;
    if tt>x2 then continue;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or
    ((nt>=t) and (abs(abs(nt-t)-abs(mnt-t))=0) and ((i+tt)>=t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
     tt:=tt-1;
     if (tt+i=0) or (tt<0) then continue;
    if tt>x2 then continue;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or
    ((nt>=t) and (abs(abs(nt-t)-abs(mnt-t))=0) and ((i+tt)>=t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
     tt:=tt+2;
     if (tt+i=0) or (tt<0) then continue;
    if tt>x2 then continue;
    nt:=((t1*i)+(t2*tt))/(tt+i);
    if ((abs(nt-t)<abs(mnt-t)) and (t<=nt)) or
    ((nt>=t) and (abs(abs(nt-t)-abs(mnt-t))=0) and ((i+tt)>=t1m+t2m)) then
     begin
      t1m:=i;
      t2m:=tt;
      mnt:=((t1*i)+(t2*tt))/(i+tt);
     end;
  end;

   end;

   writeln(t1m,' ',t2m);
end.

program Project3_1;

{$APPTYPE CONSOLE}

const
  eps = 0.0000000001;

var
  t1, t2, x1, x2, t0, l1, l2, r1, r2, m1, m2, max, ans1, ans2: int64;
  y1, y2: longint;
  t, min: extended;

begin
  {assignfile(input, 'input.txt');
  reset(input);
  assignfile(output, 'output.txt');
  rewrite(output);      }

  read(t1, t2, x1, x2, t0);

  min := -1;
  max := -1;

  for y1 := 0 to x1 do begin
    if t0 = t2 then
      y2 := 0
    else
      y2 := round((y1 * (t0 - t1)) / (t2 - t0));
    if y2 > x2 then
      continue;
    if y1 + y2 = 0 then
      t := 0
    else
      t := (t1 * y1 + t2 * y2) / (y1 + y2);
    if t - t0 <= 0 - eps then
      continue;
    if ((abs(t - t0) < min - eps) or (min = -1)) then begin
      ans1 := y1;
      ans2 := y2;
      max := y1 + y2;
      min := abs(t - t0);
    end else if (abs(t - t0) <= min + eps) and (y1 + y2 > max) then begin
      ans1 := y1;
      ans2 := y2;
      max := y1 + y2;
       min := abs(t - t0);
    end;
  end;

   for y2 := 0 to x2 do begin
    if t0 = t1 then
      y1 := 0
    else
      y1 := round((y1 * (t2 - t0)) / (t0 - t1));
    if y1 > x1 then
      continue;
    if y1 + y2 = 0 then
      t := 0
    else
      t := (t1 * y1 + t2 * y2) / (y1 + y2);
    if t - t0 <= 0 - eps then
      continue;
    if ((abs(t - t0) < min - eps) or (min = -1)) then begin
      ans1 := y1;
      ans2 := y2;
      max := y1 + y2;
      min := abs(t - t0);
    end else if (abs(t - t0) <= min + eps) and (y1 + y2 > max) then begin
      ans1 := y1;
      ans2 := y2;
      max := y1 + y2;
       min := abs(t - t0);
    end;
  end;

  write(ans1, ' ', ans2);

  closefile(input);
  closefile(output);
end.

uses Math;
Var N,M,j,k,l,v,r,t1,t2,t0,x1,x2,minx1,minx2,y2,y1:int64;
i:longint;
t,t3:extended;
Begin
{assign(input,'input.txt');
reset(input);
assign(output,'output.txt');
rewrite(output);}
readln(t1,t2,x1,x2,t0);
t:=t2;
minx1:=0;
minx2:=x2;
v:=x2;
For i:=0 to x1 do begin
  //l:=0;
  //r:=x2;
  y1:=i;
  v:=0;
 // While l<=r do begin
    if (t1=t0) and (t2=t0) then
    begin
      writeln(x1,' ',x2);
      halt(0);
    end;
    if t1=t0 then
    begin
      writeln(x1,' ',0);
      halt(0);
    end;
    if t2=t0 then
    begin
      writeln(0,' ',x2);
      halt(0);
    end;
    y2:=ceil((t1-t0)/(t0-t2)*y1);
    if y2<=x2 then begin
      if y1+y2>v then begin
        v:=y1+y2;
        minx1:=y1;
        minx2:=y2;
      end;
    end;
   { m:=(l+r) div 2;
    if (i<>0) or (m<>0) then
      t3:=((t1*i)+(t2*m))/(i+m)
    else
      t3:=0;
    if t3<t0 then
      l:=m+1
    else begin
      if (t3-t0=t) and (v<m+i) then begin
        t:=t3-t0;
        v:=m+i;
        minx1:=i;
        minx2:=m;
      end;
      if t3-t0<t then
      begin
        t:=t3-t0;
        v:=m+i;
        minx1:=i;
        minx2:=m;
      end;
    r:=m-1;
    end;
  end; }
end;
writeln(minx1,' ',minx2);
end.

const   fi='';
        fo='';
        oo=trunc(1e13);
var     t1,t2,x1,x2,t0,y1,y2,res1,res2:longint;
        t,min:real;
procedure       rinf;
begin
        assign(input,fi);
        reset(input);
        read(t1,t2,x1,x2,t0);
        close(input);
end;

function        ok:boolean;
var     temp1,temp2,temp3:int64;
begin
        t:=oo;
        if (y1+y2=0) then exit(false);
        temp1:=int64(y1)*int64(t1);
        temp2:=int64(t2)*int64(y2);
        temp3:=temp1+temp2;
        t:=temp3 / (y1+y2);
        if t>=t0 then exit(true)
        else exit(false);
end;

procedure       solve;
var     mid,l,r:longint;
begin
        min:=oo;
        for y1:=0 to x1 do
           begin
                l:=0;r:=x2;
                if x2<=2 then r:=r+2;
                repeat
                        y2:=(l+r) div 2;
                        if ok then
                          begin
                                r:=y2-1;
                                if (t<min)  then
                                  begin
                                        min:=t;
                                        res1:=y1;
                                        res2:=y2;
                                  end
                                else
                                  if (t=min) and (y1+y2>res1+res2) then
                                    begin
                                        res1:=y1;
                                        res2:=y2;
                                    end;
                          end
                        else l:=y2+1;
                until l>r;
           end;
end;

procedure       winf;
begin
        assign(output,fo);
        rewrite(output);
        write(res1,' ',res2);
        close(output);
end;

begin
        rinf;
        solve;
        winf;
end.

{$R+,Q+,I+}
{$apptype console}
Uses SysUtils;
Const
   e=0.0001;
Var
   t1,t2,x1,x2,t0,i,j,i1,j1,t:Integer;
   r,s,t3:Real;
Begin
   Read(t1,t2,x1,x2,t0);
   If t0=t1 Then Begin
      Write(x1,' ',0);
      Halt;
   End;
   If t0=t2 Then Begin
      Write(x2,' ',0);
      Halt;
   End;
   r:=High(Integer);
   t:=High(Integer);
   i1:=0;
   j1:=0;
   For i:=0 To x1 Do Begin
      s:=i*(t1-t0)/(t0-t2);
      j:=Round(s);
      If j<s Then j:=j+1;
      If j>x2 Then j:=x2;
      If j<0 Then j:=0;
      If (i=0) and (j=0) Then Continue;
      t3:=(t1*i+t2*j)/(i+j);
      If (t3>t0) or (abs(t3-t0)<e) Then Begin
         If (abs(t3-t0-r)<e) and (i+j>t) Then Begin
            t:=i+j;
            i1:=i;
            j1:=j;
         End
         Else If t3-t0<r Then Begin
            r:=t3-t0;
            t:=i+j;
            i1:=i;
            j1:=j;
         End;
      End;
   End;
   If (i1<>0) and (j1<>0) Then Write(i1,' ',j1)
   Else Write(x2);
End.

uses math;
var n,m,i,j,t,l,r,yy,zz,ii,jj:longint;
   j1,tt,tt1,t1,t2,x1,x2,t0:longint;

   k,mn:extended;
procedure prov(j1:longint);
begin
if i+j1=0 then exit;
  k:=(t1*i+t2*j1)/(i+j1);
  k:=k-t0;
  if k<0 then exit;
   if k<=mn then begin
                     ii:=i;
                     jj:=j1;
                     mn:=k;
                  end;

end;

begin

  read(t1,t2,x1,x2,t0);
  tt:=t2-t0;
  tt1:=t0-t1;
  mn:=t2;
  if tt1=0 then begin
                write( x1,' 0');
                halt;
               end;
  if tt=0 then begin
                write( '0 ',x2);
                halt;
               end;
   for i:=0 to x1 do
    begin
       j:=min(trunc(tt1/tt*i),x2);
      // if (j>x2)or(j<=0) then continue;
       prov(j);
     //  prov(j+1);

    end;

   if ii+jj=0 then write('0 ',x2) else write(ii,' ',jj);

end.

var
  t1,t2,x1,x2,t0,minx,minf,f,min,x : longint;
  px,tx,mint,fx : extended;
  ok : boolean;

  function _round(x : extended) : longint;
  begin
    if (frac(x)>=0.5) then _round:=trunc(x)+1
                      else _round:=trunc(x);
  end;

begin
  {assign(input,'input.txt'); reset(input);
  assign(output,'output.txt'); rewrite(output);}
  readln(t1,t2,x1,x2,t0);
  min:=-maxlongint;
  mint:=maxlongint;
  if (t1=t0) and (t2=t0)
    then
      if (x1>x2) then begin minx:=x1; minf:=0; end
                 else begin minx:=0; minf:=x2; end
    else begin
      if (t1=t0) then begin minx:=x1; minf:=0; end;
      if (t2=t0) then begin minx:=0; minf:=x2; end;
    end;
  if (t1<>t0) and (t2<>t0) then begin
  for x:=1 to x1 do begin
    px:=(t0*x-t1*x)/(t2-t0);
    if (px<=x2) and (px>=0)
      then begin
        f:=_round(px);
        tx:=(t1*x+t2*f)/(x+f);
        if (tx-t0<0) then fx:=t0-tx else fx:=tx-t0;
        if (x+f>min) and (fx<=mint) and (tx>=t0)  then begin
          minx:=x; minf:=f; min:=x+f; mint:=fx;
        end;
      end;
  end;
  end;
  writeln(minx,' ',minf);
  close(input); close(output);
end.

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils, Math;

const
  eps = 1e-9;

var
  bsum, a, b: Integer;
  t, f: Double;
  t1, t2, x1, x2, t0: Integer;
  y1, y2: Integer;

begin
  //Reset(input, 'input.txt'); Rewrite(output, 'output.txt');
  Readln(t1, t2, x1, x2, t0);
  y1 := 0;
  t := maxint; bsum := -1; a := -1; b := -1;
  for y2 := 0 to x2 do
    begin
      while True do
        begin
          if (y1+y2 > 0) then
            begin
              f := (1.0*y1*t1+y2*t2)/(y1+y2);
              if (f - t0 < t - t0) or (samevalue(f-t0, t-t0, eps) and (y1+y2 > bsum)) then
                begin
                  a := y1; b := y2; bsum := y1 + y2; t := f;
                end;
            end;
          Inc(y1);
          if (y1 + y2 = 0) or ((1.0*y1*t1+y2*t2)/(y1+y2)+eps < t0) or (y1 > x1) then
            begin
              Dec(y1); break;
            end;
          if (y1+y2 > 0) then
            begin
              f := (1.0*y1*t1+y2*t2)/(y1+y2);
              if (f - t0 < t - t0) or (samevalue(f-t0, t-t0, eps) and (y1+y2 > bsum)) then
                begin
                  a := y1; b := y2; bsum := y1 + y2; t := f;
                end;
            end;
        end;
    end;
  Writeln(a, ' ', b);
end.

{$O-}
program taskC;

var
  t1,t2,x1,x2,t0,y1,y2,ans1,ans2:longint;max:extended;

begin
  //assign(input,'input.txt');
  //assign(output,'output.txt');

  read(t1,t2,x1,x2,t0);

  max:=maxlongint;ans1:=0;ans2:=0;
  if t0=t1 then ans1:=x1 else
  if t0=t2 then ans2:=x2 else
  begin
    for y1:=0 to x1 do
    begin
      y2:=y1*(t1-t0) div (t0-t2);
      if (y1=0) and (y2=0) then inc(y2);
      while (t1*y1+t2*y2) div (y1+y2)<t0 do
        inc(y2);

      if (y1<=x1) and (y2<=x2) then begin
        if (t1*y1+t2*y2)/(y1+y2)<max then begin
          ans1:=y1;ans2:=y2;max:=(t1*y1+t2*y2)/(y1+y2);
        end
        else if ((t1*y1+t2*y2)/(y1+y2)-max<1e-10) and (y1+y2>ans1+ans2) then begin
            ans1:=y1;ans2:=y2;max:=(t1*y1+t2*y2)/(y1+y2)
          end;
      end;
    end;
  end;

  write(ans1,' ',ans2);
end.