#include <iostream>
#include <algorithm>
#include <map>
#include <string>
#include <math.h>
typedef long long ll;

using namespace std;

int main(){
    double A,B,C,D,E,F;
    cin >> A >> B >> C >> D >> E >> F;
    A*=100;
    B*=100;

    double res1=100,res2=0;
    for (int i=0;A*i<=F;i++){
	for (int j=0;(A*i+B*j)<=F;j++){
	    for (int k=0;(A*i+B*j+C*k)<=F;k++){
	       for (int l=0;(A*i+B*j+C*k+D*l)<=F;l++){
		   double a=A*i+B*j,b=C*k+D*l;
		   if (E*a >= 100*b){
		       if (b*res1 >= res2*(a+b)){
			   res1=a+b;
			   res2=b;
		       }
		   }
	       }
	   }
	}
    }

    cout << res1 << " " << res2 << endl;

    return 0;
}