#include <cstdio>
#include <cstring>
#include <cmath>
#include <stdlib.h>
#include <queue>
#include <set>
#include <iostream>
#include <stack>
#include <map>
#include <unordered_map>
#include <vector>
#include <algorithm>
//#include <assert.h>
//#include <sstream>
using namespace std;

#define ll long long
#define ull unsigned long long
#define pii pair <int, int>
#define piii pair <int, pii>
#define vi vector <int>
#define vl vector <ll>
#define pll pair <ll, ll> 
#define PI acos(-1)
#define MP make_pair
#define PB push_back
#define F first
#define S second
#define mem(a, b) memset(a, b, sizeof(a))
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) (a*(b/gcd(a,b)))
#define sqr(a) ((a)*(a))
#define inf 100000000
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fLL;
#define mod 1000000007
#define mod1 1000000007
#define mod2 1000000009
#define b1 43
#define b2 41
#define EPS 1e-9
//define harmonic(n) 0.57721566490153286l+log(n)
#define nl puts("")
#define odd(n) ((n)&1)
#define even(n) (!((n)&1))
#define vsort(v) sort(v.begin(), v.end())
#define lc (node<<1)
#define rc ((node<<1)|1)
//loop
#define rep(i, n) for(int i = 0; i < n; ++i)
#define REP(i, n) for(int i = 1; i <= n; ++i)
#define forn(i, j, n) for(int i = j; i <= n; ++i)
//input
#define si(a) scanf("%d", &a)
#define sii(a, b) scanf("%d%d", &a, &b)
#define siii(a, b, c) scanf("%d%d%d", &a, &b, &c)
#define sl(a) scanf("%lld", &a)
#define sll(a, b) scanf("%lld%lld", &a, &b)
#define slll(a, b, c) scanf("%lld%lld%lld", &a, &b, &c)
#define sd(a) scanf("%lf", &a)
#define sc(a) scanf("%c", &a)
#define sst(a) scanf("%s", a)
inline bool EQ(double a, double b) { return fabs(a-b) < 1e-9; }
//debug
#ifdef tahsin

template < typename F, typename S >
ostream& operator << ( ostream& os, const pair< F, S > & p ) {
	return os << "(" << p.first << ", " << p.second << ")";
}

template < typename T >
ostream &operator << ( ostream & os, const vector< T > &v ) {
	os << "{";
	for(auto it = v.begin(); it != v.end(); ++it) {
		if( it != v.begin() ) os << ", ";
		os << *it;
	}
    return os << "}";
}

template < typename T >
ostream &operator << ( ostream & os, const set< T > &v ) {
	os << "[";
	for(auto it = v.begin(); it != v.end(); ++it) {
		if( it != v.begin()) os << ", ";
		os << *it;
	}
    return os << "]";
}

template < typename F, typename S >
ostream &operator << ( ostream & os, const map< F, S > &v ) {
	os << "[";
	for(auto it = v.begin(); it != v.end(); ++it) {
		if( it != v.begin() ) os << ", ";
		os << it -> first << " = " << it -> second ;
	}
    return os << "]";
}

#define dbg(args...) do {cerr << #args << " : "; faltu(args); } while(0)

clock_t tStart = clock();
#define timeStamp dbg("Execution Time: ", (double)(clock() - tStart)/CLOCKS_PER_SEC)

void faltu () { cerr << endl; }

template <typename T>
void faltu( T a[], int n ) {
	for(int i = 0; i < n; ++i) cerr << a[i] << ' ';
	cerr << endl;
}

template <typename T, typename ... hello>
void faltu( T arg, const hello &... rest) { cerr << arg << ' '; faltu(rest...); }

#else
#define dbg(args...)
#endif

ll add(ll a, ll b, ll m = mod) {
	ll ret = a+b;
	if(ret >= m) ret -= m;
	return ret;
}

ll subtract(ll a, ll b, ll m = mod) {
	ll ret = a-b;
	if(ret < 0) ret += m;
	return ret;
}

ll mult(ll a, ll b, ll m = mod) {
	ll ret = a*b;
	if(ret >= m) ret %= m;
	return ret;
}

ll bigmod(ll a, ll b, ll m = mod) {
	ll ret = 1;
	while(b) {
		if(b&1) ret = mult(ret, a, m);
		b >>= 1; a = mult(a, a, m);
	}
	return ret;
}

ll inverse(ll n, ll m = mod) { return bigmod(n, mod-2, m); }

/*
bool base[1000010];
vi primes;
void sieve(int mx) {
	mx += 10;
	int x = sqrt(mx);
	for(int i = 3; i <= x; i += 2) if(base[i] == 0) for(int j = i*i, k = i<<1; j < mx; j += k) base[j] = 1;
	primes.PB(2);
	for(int i = 3; i < mx; i += 2) if(base[i] == 0) primes.PB(i);
}
*/


//Direction Array 
//int fx[]={1, -1, 0, 0}; int fy[]={0, 0, 1, -1};
//int fx[]={0, 0, 1, -1, -1, 1, -1, 1}; int fy[]={-1, 1, 0, 0, 1, 1, -1, -1};

//bit manipulation
/*
bool checkBit(int n, int i) { return (n&(1<<i)); }
int setBit(int n, int i) { return (n|(1<<i)); }
int resetBit(int n, int i) { return (n&(~(1<<i))); }
*/
//end of template


#define mxn 3010

int a, b, c, d, e, f, vis[mxn][mxn];
pair <double, pii> dp[mxn][mxn];

pair <double, pii> rec(int x, int y) {
	if(y*(100+e) > e*(x*100+y)) return {-1, {0, 0}};

	auto &ret = dp[x][y];
	if(vis[x][y]) return ret;
	vis[x][y] = 1;

	ret = {0, {0, 0}};
	if(x*100 + y + 100*a <= f) {
		auto tmp = rec(x+a, y);
		if(tmp.F != -1) {
			tmp.S.F += a;
			tmp.F = 100.0*tmp.S.S/(tmp.S.F*100.0 + tmp.S.S);
			ret = max(ret, tmp);
		}
	} 
	if(x*100 + b*100 + y <= f) {
		auto tmp = rec(x+b, y);
		if(tmp.F != -1) {
			tmp.S.F += b;
			tmp.F = 100.0*tmp.S.S/(tmp.S.F*100.0 + tmp.S.S);
			ret = max(ret, tmp);
		}
	}
	if(x*100 + y + c <= f) {
		auto tmp = rec(x, y+c);
		if(tmp.F != -1) {
			tmp.S.S += c;
			tmp.F = 100.0*tmp.S.S/(tmp.S.F*100.0 + tmp.S.S);
			ret = max(ret, tmp);
		}
	}
	if(x*100 + y + d <= f) {
		auto tmp = rec(x, y+d);
		if(tmp.F != -1) {
			tmp.S.S += d;
			tmp.F = 100.0*tmp.S.S/(tmp.S.F*100.0 + tmp.S.S);
			ret = max(ret, tmp);
		}
	}
	return ret;
}

int main () {
#ifdef tahsin
	freopen("in", "r", stdin);
//	freopen("out", "w", stdout);
#endif

	while(scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) == 6) {
		vi x, y;
		for(int i = 0; i <= f; i += a*100) for(int j = 0; i+j <= f; j += b*100) x.PB(i+j);
		for(int i = 0; i <= f; i += c) for(int j = 0; i+j <= f; j += d) y.PB(i+j);

		int water = 100*a, sugar = 0;
		for(auto p: x) for(auto q: y) if( p+q <= f && 100*q <= p*e) {
			if(q*water > p*sugar) water = p, sugar = q;
		}

		printf("%d %d\n", sugar+water, sugar);

		/*
//		mem(vis, 0);
//		auto ret = rec(0, 0);
//		dbg(ret);
		dbg(a, b, c, d, e, f);
		double ans = 0; int sugar = 0, tot = 0;
		for(int i = 0; i <= f; i += a*100) {
			for(int j = 0; i+j <= f; j += b*100) {
				for(int k = 0; i+j+k <= f && check(i+j, k); k += c) {
					for(int l = 0; i+j+k+l <= f && check(i+j, k+l); l += d) {
						if(i+j+k+l == 0) continue;
						double tmp = calc(i+j, k+l);
						if(tmp > ans) {
							ans = tmp;
							tot = i+j+k+l;
							sugar = k+l;
//							dbg(i, j, k, l);
//							dbg(tot, sugar);
						}
					}
				}
			}
		}

		if(ans == 0) tot = sugar = 0;

		printf("%d %d\n", tot, sugar);
		*/
	}

//	timeStamp;
	return 0;
}


Measured memory_bytes: 1400