#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <map>
#include <vector>
#include <queue>
#include <algorithm>

using namespace std;

//typedef pair<int,int> P;

int main(){
	int A,B,C,D,E,F;
	scanf("%d %d %d %d %d %d", &A, &B, &C, &D, &E, &F);

	int m = 0;
	int w = 100*A;

	for(int i=1;i<31;i++){
		for(int j=0;j<31;j++){
			int x = 100*A*i + 100*B*j;
			if(F<x) continue;
			for(int k=0;C*k<=E*x/100;k++){
				for(int l=0;C*k+D*l<=E*x/100;l++){
					int y = C*k+D*l;
					if(y*(w+m) > m*(x+y) && (x+y)<=F){
						m = y;
						w = x;
					}
				}
			}
		}
	}

	printf("%d %d\n", (m+w), m);

	return 0;
}
