#include <bits/stdc++.h>
#define REP(i,a,b) for(int i=(a);i<(b);i++)
typedef long long ll;
using namespace std;
const int INF=1e9, MOD=1e9+7;
const int MAX_N=10000;
int a,b,c,d,e,f;

int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	
	cin >> a >> b >> c >> d >> e >> f;
	
	bool water[3001]={false};
	bool sugar[3001]={false};
	REP(i,0,31) REP(j,0,31) if(100*a*i+100*b*j<=f) water[100*a*i+100*b*j]=true;
	REP(i,0,3001) REP(j,0,3001) if(c*i+d*j<=f) sugar[c*i+d*j]=true;
	
	int wat=0,sug=0;
	REP(i,1,3001){
		REP(j,0,3001){
			if(water[i] and sugar[j] and i*e>=100*j){
				if(i+j<=f and sug*(i+j)<=j*(wat+sug)){
					wat=i;
					sug=j;
				}
			}
		}
	}
	
	cout << wat+sug << " " << sug << endl;
	return 0;
}
