#include<iostream>
using namespace std;

int main() {

  int A,B,C,D,E,F; cin >> A >> B >> C >> D >> E >> F;
  double maxp = -1.0;
  int ansa,ansb;
  for ( int i = 0; 100*A*i <= F; i++ ) {
    for ( int j = 0; 100*A*i + 100*B*j<=F; j++ ) {
      if ( i == 0 && j == 0 ) continue;
      for ( int k = 0; 100*A*i + 100*B*j+ C*k <= F; k++ ) {
	for ( int l = 0; 100*A*i + 100*B*j + C*k + l*D <= F; l++ ) {
	  if ( i == 0 && j == 0 && k == 0 && l == 0 ) continue;
	  int x = 100 * A * i + 100 * B * j;
	  int y = C*k + D * l;
	  double p = 100.0*y/(x+y);
	  if (p <=100.0*E/(100.0+E) && maxp < p ) {
	      maxp = p;
	      ansa = x+y;
	      ansb = y;
	    }
	  }
	}
      }
    }
  

  cout << ansa << " " << ansb << endl;
  return 0;
}
