process.stdin.resume();
process.stdin.setEncoding('utf8');

var g_input = '';
process.stdin.on('data', function(chunk) {
    g_input += chunk;
});

process.stdin.on('end', function() {
    Main(g_input.split(/\r?\n/));
});

var memo = {};

function dfs(a, b, c, d, e, f, water, suger) {

    if (water + suger > f) {
        return {water: 0, suger: 0, concentration: -1};
    }

    var concentration = 0;
    if (water + suger > 0) {
        concentration = (suger / (water + suger)) * 100;
    }
    if (concentration > (e / (100 + e) * 100)) {
        return {water: 0, suger: 0, concentration: -1};
    }

    if (memo[water + ',' + suger]) {
        return memo[water + ',' + suger];
    }

    var ret = {water: water, suger: suger, concentration: concentration};

    var work;
    work = dfs(a, b, c, d, e, f, water + a * 100, suger);
    if (work.concentration > ret.concentration) {
        ret = work;
    }
    work = dfs(a, b, c, d, e, f, water + b * 100, suger);
    if (work.concentration > ret.concentration) {
        ret = work;
    }
    work = dfs(a, b, c, d, e, f, water, suger + c);
    if (work.concentration > ret.concentration) {
        ret = work;
    }
    work = dfs(a, b, c, d, e, f, water, suger + d);
    if (work.concentration > ret.concentration) {
        ret = work;
    }

    memo[water + ',' + suger] = ret;
    return ret;
}

function Main(input) {
    var params = input[0].split(' ');
    var a = parseInt(params[0], 10);
    var b = parseInt(params[1], 10);
    var c = parseInt(params[2], 10);
    var d = parseInt(params[3], 10);
    var e = parseInt(params[4], 10);
    var f = parseInt(params[5], 10);

    var ret = dfs(a, b, c, d, e, f, 0, 0);
    console.log((ret.water + ret.suger) + ' ' + ret.suger);

    return 0;
}