console.log((args=>{
  const [A,B,C,D,E,F] = args.trim().split` `.map(v=>0|v);
  const W = new Set(), S = new Set();
  for ( let a = 0; a < F; a=a+A*100 ) {
    for ( let b = 0; a+b < F; b=b+B*100 ) W.add(a+b);
  }
  const R = E * F / ( 100 + E );
  for ( let c = 0; c < R; c=c+C ) {
    for ( let d = 0; c+d < R; d=d+D ) S.add(c+d);
  }
  let max = [0,0,0];
  for ( const w of W ) {
    for ( const s of S ) {
      const d = s*100/(s+w);
      if ( s*100 > E*w || s+w > F ) continue;
      if ( d > max[0] ) max = [d,s+w,s];
    }
  }
  if ( max[0] === 0 ) return `${A*100} 0`;
  return `${max[1]} ${max[2]}`;
})(require('fs').readFileSync('/dev/stdin', 'utf8')));
