#include <bits/stdc++.h>
using namespace std;
  
int main()
{
    int A,B,C,D,E,F;
    int Ai,Bi,tan,kefan,sum;
    int maxx1 = -1,maxx2 = 1;
    double maxx3 = -1.0;
    cin>>A>>B>>C>>D>>E>>F;
    Ai = A*E; Bi = B*E;
  
    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;
  
        if (kefan<tan||sum>F)continue;
   
        if (sum!=0&&tan*1.0/sum>maxx3) {
            maxx1 = sum;
            maxx2 = tan;
            maxx3 = tan*1.0/sum;
        }
    }
    cout<<maxx1<<" "<<maxx2<<endl;
    return 0;
}