#include <bits/stdc++.h>
using namespace std;
int main(){
    int a,b,c,d,e,f,ansz=0,anss=0;
    cin>>a>>b>>c>>d>>e>>f;
    for(int i=0;i<=f;i+=100*a){
        for(int j=0;i+j<=f;j+=100*b){
            for(int k=0;(i+j)/100*e>=k;k+=c){
                for(int l=0;(i+j)/100*e>=k+l&&i+j+k+l<=f;l+=d){
                    if(anss==0)anss=k+l,ansz=i+j+k+l;
                    else if((double)anss/ansz<(double)(k+l)/(i+j+k+l))anss=k+l,ansz=i+j+k+l;
                }
            }        
        }
    }
    cout<<ansz<<" "<<anss<<endl;
    return 0;
}