#include<cstdio>
#include<vector>

using namespace std;

int main(){
	int a, b, c, d, e, f; scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f);
	a *= 100; b *= 100;
	vector<int> w, s;
	for(int i = 0; i <= f / 100; i++) for(int j = 0; j <= f / 100; j++){
		if(a * i + b * j <= f) w.push_back(a * i + b * j);
	}
	for(int i = 0; i <= f; i++) for(int j = 0; j <= f; j++){
		if(c * i + d * j <= f) s.push_back(c * i + d * j);
	}
	int res1 = -1, res2;
	for(int i = 1; i < w.size(); i++) for(int j = 0; j < s.size(); j++){
		if(w[i] + s[j] > f) continue;
		if(w[i] * e < 100 * s[j]) continue;
		if(res1 < 0 || res1 * s[j] > res2 * (w[i] + s[j])) { res1 = w[i] + s[j]; res2 = s[j]; }
	}
	printf("%d %d\n", res1, res2);
	return 0;
}