void main(){
  import std.stdio, std.string, std.conv, std.algorithm;
  
  long a, b, c, d, e, f;
  rd(a, b, c, d, e, f);

  /*
  100b/(a+b) < 100b'/(a'+b')
  
  100b*(a'+b') < 100b'*(a+b)
  */
  long mx_w=100*a, mx_s;
  for(long w1=100*a; w1<=f; w1+=100*a){
    for(long w2=0; w2<=f; w2+=100*b){
      for(long s1=0; s1<=f; s1+=c){
        for(long s2=0; s2<=f; s2+=d){
          // cap?
          if(w1+w2+s1+s2 > f) continue;

          // dissolved?
          if(e*(w1+w2)/100 < s1+s2) continue;

          if(mx_s*((w1+w2)+(s1+s2)) < (s1+s2)*(mx_w+mx_s)){
            mx_w=w1+w2; mx_s=s1+s2;
          }
        }
      }
    }
  }

  writeln(mx_w+mx_s, " ", mx_s);

}

void rd(T...)(ref T x){
  import std.stdio, std.string, std.conv;
  auto l=readln.split;
  foreach(i, ref e; x){
    e=l[i].to!(typeof(e));
  }
}