#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main(){
  double a,b,c,d,e,f;
  /*double t[2];
  bool dp[5][3500];*/
  cin >>a>>b>>c>>d>>e>>f;
  ll k=f/(100*a);
  double ans=-1,h=100;
  ll sa=0,wa=100*a;
  for(ll i=0;i<=k;i++){
    ll l=(f-i*100*a)/b;
   for(ll j=0;j<=l;j++){
     if(i==j&&i==0) continue;
     double w=100*i*a+100*j*b;
     double s=f-w,q=(w/100)*e;
     if(s<q) q=s;
     ll p=q/c;
     for(ll k=0;k<=p;k++){
       ll u=(q-k*c)/d;
       for(ll e=0;e<=u;e++){
         double ss=k*c+e*d;
         double no=(h*ss)/(w+ss);
         if(no>ans){
           ans=no;
           sa=ss;
           wa=w;
         }
       }
     }
   }
  }
  cout <<sa+wa<<" "<<sa<<endl;
}
