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 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 maxSugaredWater = 0;
    var maxSugar = 0;
    var maxConcentration = 0;

    for (var i = 0; i < f / 100; i++) {

        if (i * a * 100 > f) {
            break;
        }

        for (var j = 0; j < f / 100; j++) {

            if ((i == 0 && j == 0) || (i * a + j * b) * 100 > f) {
                break;
            }

            var water = (i * a + j * b) * 100;

            for (var k = 0; k < f; k++) {

                if (water + k * c > f) {
                    break;
                }

                if (k * c > (water / 100) * e) {
                    break;
                }

                for (var l = 0; l < f; l++) {

                    if (water + k * c + l * d > f) {
                        break;
                    }

                    if (k * c + l * d > (water / 100) * e) {
                        break;
                    }

                    var concentration = ((k * c + l * d) / (k * c + l * d + water)) * 100;
                    if (concentration > maxConcentration) {
                        maxConcentration = concentration;
                        maxSugaredWater = k * c + l * d + water;
                        maxSugar = k * c + l * d;
                    }
                }
            }
        }
    }

    if (maxSugaredWater == 0) {
        maxSugaredWater = a * 100;
    }

    console.log(maxSugaredWater + ' ' + maxSugar);

    return 0;
}
