#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main(){
  int A,B,C,D,E,F;
  cin>>A>>B>>C>>D>>E>>F;
  vector<pair<double,pair<int,int>>> vec;
  for(int a=0;a*A*100<=F;a++){
    for(int b=0;a*A*100+b*B*100<=F;b++){
      for(int c=0;(c*C<=(A*a+B*b)*E)&(a*A*100+b*B*100+c*C<=F);c++){
        for(int d=0;(d*D<=(A*a+B*b)*E-c*C)&(a*A*100+b*B*100+c*C+d*D<=F);d++){
        	vec.push_back(make_pair((double)100*(c*C+d*D)/(a*A*100+b*B*100+c*C+d*D),make_pair(a*A*100+b*B*100+c*C+d*D,c*C+d*D)));
        }
      }
    }
  }
  
  sort(vec.begin(),vec.end());
  auto it=vec.end();
  it--;
  cout << it->second.first << " " << it->second.second << endl;
}