import std.stdio, std.conv, std.string;
import std.algorithm, std.array, std.container;
import std.numeric, std.math;
import core.bitop;

T RD(T = string)() { static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res.to!T; }
string RDR()() { return readln.chomp; }

long mod = pow(10, 9) + 7;
long moda(long x, long y) { return (x + y) % mod; }
long mods(long x, long y) { return ((x + mod) - (y % mod)) % mod; }
long modm(long x, long y) { return (x * y) % mod; }

void main()
{
	auto A = RD!long;
	auto B = RD!long;
	auto C = RD!long;
	auto D = RD!long;
	auto E = RD!long;
	auto F = RD!long;

	long bestP, bestQ, bestSQ;
	foreach (ai; 0..30)
	{
		auto aq = A * ai;
		foreach (bi; 0..30)
		{
			if (ai + bi == 0) continue;

			auto bq = B * bi;
			auto wq = aq + bq;
			auto remain = F - wq * 100;
			if (remain < 0) continue;

			auto limit = min(remain, wq * E);
			long sq;
			foreach_reverse (i; 0..limit+1)
			{
				bool isDone = false;
				long s = i;
				while (s >= 0)
				{
					if (s % C == 0 || s % D == 0)
					{
						sq = i;
						isDone = true;
						break;
					}
					s -= C;
				}
				if (isDone) break;
			}
			//auto sq1   = ((limit / C) * C) + ((limit % C) / D) * D;
			//auto sq2   = ((limit / D) * D) + ((limit % D) / C) * C;
			//auto sq    = max(sq1, sq2);
			auto q     = wq * 100 + sq;
			auto p     = sq * 100 / q;

			if (p >= bestP)
			{
				bestP  = p;
				bestQ  = q;
				bestSQ = sq;
				//stderr.writeln(remain, " ", wq * E, " ", limit);
			}
		}
	}
	
	writeln(bestQ, " ", bestSQ);
	stdout.flush();
}