#include<iostream>
using namespace std;
typedef long long LL;
const int INF = int(1e9);
 
double A,B,C,D,E,F;
double Ai,Bi;
double maxx1 = -1,maxx2 = 1;
 
int main()
{
    cin>>A>>B>>C>>D>>E>>F;
    Ai = A*E; Bi = B*E;
    double tan,kefan,sum;
 
    for(int a = 0;a*A*100<=F;a++)
    for(int b = 0;b*B*100<=F-a*A*100;b++)
    for(int c = 0;c*C<=F-a*A*100-b*B*100;c++)
    for(int d = 0;d*D<=F-a*A*100-b*B*100-c*C;d++)
    {
        tan = c*C+d*D;
        sum = A*a*100+B*b*100+tan;
        kefan = Ai*a+Bi*b;
        //cout<<a<<"->"<<b<<" "<<c<<" "<<d<<endl;
       // cout<<sum<<" "<<tan<<" "<<kefan<<endl;
        if(kefan<tan||sum>F)continue;
 
        if(sum!=0&&tan/sum>maxx2/maxx1){
            maxx1 = sum;
            maxx2 = tan;
        }
    }
    cout<<int(maxx1)<<" "<<int(maxx2)<<endl;
    return 0;
}