'use strict'

function main(input){
  const lines = input.split('\n');
  const ABCDEF = lines.shift().split(' ').map(x => parseInt(x));
  const A = ABCDEF[0];
  const B = ABCDEF[1];

  const C = ABCDEF[2];
  const D = ABCDEF[3];

  const E = ABCDEF[4];
  const F = ABCDEF[5];

  let water = [];
  let sugers = [];
  for(let i=0;i<F;i++){
    for(let j=0;j<F;j++){
      let current_water = 100*A*i + 100*B*j;
      if(current_water<=F){ water.push(current_water); }

      let current_suger = C*i + D*j;
      if(current_suger<=F){ sugers.push(current_suger); }
    }
  }

  let result = [F,0];
  let limit_density = E/(100+E);
  for(let i=0;i<water.length;i++){
    for(let j=0;j<sugers.length;j++){
      let current_density = sugers[j]/(water[i] + sugers[j]);
      let result_density = result[1]/result[0];
      if( sugers[j] + water[i] <= F && (current_density <= limit_density) && current_density>result_density){
        result = [water[i]+sugers[j], sugers[j]]
      }
    }
  }

  console.log(result.join(' '));
}
main( require('fs').readFileSync( '/dev/stdin', 'utf8') );
