#include <bits/stdc++.h>
using namespace std;

int main() {
    int a, b, c, d, e, f;
    int sum=1, maxsug=0;
    cin >> a >> b >> c >> d >> e >> f;
    for (int i=0; i*a*100<=f; i++)
        for (int j=0; j*b*100+i*a*100<=f; j++)
            for (int k=0; k*c+i*a*100+j*b*100<=f; k++)
                for (int l=0; l*d+k*c+i*a*100+j*b*100<=f; l++) {
                    int sugar = k*c+l*d, wat = (i*a+j*b)*100;
                    if (wat != 0 && 
                            1.0 * 100 * sugar / wat <= e &&
                            1.0 * sugar / (sugar+wat) >= 1.0 * maxsug / sum) {
                        sum = wat + sugar; maxsug = sugar;
                    }
                }
    cout << sum << ' '<< maxsug << endl;
}