#include <iostream>
#include <algorithm>
#include <math.h>
#include <cstring>
#include <string>
#include <map>
using namespace std;
typedef long long ll;

int main() {
    double A = 0 , B = 0 , C = 0 , D = 0, E = 0, F = 0;
    double sumt = 1, sugart = -1, sum = 0, sugar = 0;
    cin >> A >> B >> C >> D >> E >> F;
    for (double i = 0; i*100*A <= F; i++) {
        for (double j = 0; j*100*B <= F-i*100*A; j++) {
            for (double k = 0; k*C <= F-i*100*A-j*100*B; k++) {
                for (double l = 0; l*D <= F-i*100*A-j*100*B-k*C; l++) {
                    sugar = k*C + l*D;
                    sum = i*100*A + j*100*B + sugar;
                    int judge = A*E*i + B*E*j;
                    if (sugar > judge || sum > F) continue;
                    if (sum != 0 && sugar / sum > sugart / sumt) {
                        sugart = sugar;
                        sumt = sum;
                    }
                }
            }
        }
    }
    cout << int(sumt) << ' ' << int(sugart) << endl;
    return 0;
}