#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
	int a, b, c, d, e, f;
	cin >> a >> b >> c >> d >> e >> f;
	int ans_w = 0, ans_s = 0;
	for(auto i = 0; i * a * 100 <= f; ++i){
		for(auto j = 0; (i * a + j * b) * 100 <= f; ++j){
			int w = (i * a + j * b) * 100;
			for(auto k = 0; k * c <= f - w; ++k){
				for(auto l = 0; k * c + l * d <= f - w; ++l){
					int s = k * c + l * d;
					if(s > e * (w / 100)) break;
					if(ans_w + ans_s == 0 || ans_s * (w + s) < s * (ans_w + ans_s)){
						ans_w = w;
						ans_s = s;
					}
				}
			}
		}
	}
	cout << ans_w + ans_s << " " << ans_s << endl;
	return 0;
}