#include <iostream> 
#include <cmath>
#include  <algorithm>
#define ll long long 
using namespace std;
ll A, B, C, D, E, F;
int main() {
	ll ans1 = 0, ans2 = 0;
	double tmp ,LD=-1;
	cin >> A >> B >> D >> E >> F;
	for (int a = 0; a*A * 100 <= F; a++) {
		for (int b = 0; b*B * 100 + a * A * 100 <= F; b++) {
			for (int c = 0; c*C + b * B * 100 + a * A * 100 <= F; c++) {
				for (int d = 0; d*D + c * C + b * B * 100 + a * A * 100 <= F; d++) {
					if ((c*C + d * D) > (A*a + b * B)*E|| (d * D + c * C + b * B * 100 + a * A * 100==0) )break;
					tmp = 1.0*(c*C + d * D) / (d * D + c * C + b * B * 100 + a * A * 100);
					if (tmp > LD) {
						LD = tmp;
						ans1 = d * D + c * C + b * B * 100 + a * A * 100;
							ans2 = c * C + d * D;
					}
				}
			}
		}
	}
	cout << ans1 << " " << ans2 << endl;
}