// Slower C++ solution:
#define _CRT_SECURE_NO_WARNINGS

#include <iostream>

#include <fstream>

#include <string>

#include <algorithm>

#include <cstdlib>

#include <vector>

#include <stack>

#include <queue>

#include <complex>

#include <set>

#include <list>

#include <iomanip>

#include <map>

#include <memory.h>







using namespace std;

static const double EPS = 1e-9;

typedef long long ll;

typedef unsigned long long ull;

#define FOR(i,n) for(int i=0;i<(int)n;++i)

#define FORNUM(p, x) for (int num = p; num < (int)(x); ++num)

#define FORI(p, x) for (int i = p; i < (int)(x); ++i)

#define FORJ(p, x) for (int j = p; j < (int)(x); ++j)

#define FORK(p, x) for (int k = p; k < (int)(x); ++k)

#define FORL(p, x) for (int l = p; l < (int)(x); ++l)



typedef pair<int,int>P;

#define INF 1000000000

 

struct edge { 

	int from, to; 

	edge (int from, int to){

		this->from=from; this->to=to;

	}

};

 

int V,E;

typedef vector<edge> edges;

vector<edges> G;







int main(){

	int a, b, c, d, e, f;

	cin >> a >> b >> c >> d >> e >> f;

	set<int> sugar, water;

	for (int i = 0; i <= f; i++) {

		for (int j = 0; j <= f; j++) {

			int y = i*c + j*d;

			if (y <= f)

				sugar.insert(y);

		}



	}

	for (int i = 0; i*100 <= f; i++) {

		for (int j = 0; j*100 <= f; j++) {

			int y = i*a*100 + j*b*100;

			if (y <= f)

				water.insert(y);

		}



	}

	double rate = -1.0;

	int answ=0, anss=0;

	for (set<int>::iterator p = water.begin(); p != water.end(); p++) {

		for (set<int>::iterator q = sugar.begin(); q != sugar.end(); q++) {

			if (*q * 100.0 <= e * *p && *p+*q <= f) {

				double y = *q * 100.0 / (*p + *q);

				if (y > rate) {

					answ = *p; anss = *q;

					rate = y;

				}



			}	

			

		}

	}

	cout << answ+anss << " " << anss << endl;

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.071120136247866x):
#define _CRT_SECURE_NO_WARNINGS

#include <iostream>

#include <fstream>

#include <string>

#include <algorithm>

#include <cstdlib>

#include <vector>

#include <stack>

#include <queue>

#include <complex>

#include <set>

#include <list>

#include <iomanip>

#include <map>

#include <memory.h>







using namespace std;

static const double EPS = 1e-9;

typedef long long ll;

typedef unsigned long long ull;

#define FOR(i,n) for(int i=0;i<(int)n;++i)

#define FORNUM(p, x) for (int num = p; num < (int)(x); ++num)

#define FORI(p, x) for (int i = p; i < (int)(x); ++i)

#define FORJ(p, x) for (int j = p; j < (int)(x); ++j)

#define FORK(p, x) for (int k = p; k < (int)(x); ++k)

#define FORL(p, x) for (int l = p; l < (int)(x); ++l)



typedef pair<int,int>P;

#define INF 1000000000

 

struct edge { 

	int from, to; 

	edge (int from, int to){

		this->from=from; this->to=to;

	}

};

 

int V,E;

typedef vector<edge> edges;

vector<edges> G;







int main(){

	int a, b, c, d, e, f;

	cin >> a >> b >> c >> d >> e >> f;

	set<int> sugar, water;

	for (int i = 0; c*i <= f; i++) {

		for (int j = 0; d*j <= f; j++) {

			int y = i*c + j*d;

			if (y <= f)

				sugar.insert(y);

		}



	}

	for (int i = 0; a*i*100 <= f; i++) {

		for (int j = 0; b*j*100 <= f; j++) {

			int y = i*a*100 + j*b*100;

			if (y <= f)

				water.insert(y);

		}



	}

	double rate = -1.0;

	int answ=0, anss=0;

	for (set<int>::iterator p = water.begin(); p != water.end(); p++) {

		for (set<int>::iterator q = sugar.begin(); q != sugar.end(); q++) {

			if (*q * 100.0 < (e+EPS) * *p && *p+*q < (f+EPS)) {

				double y = *q * 100.0 / (*p + *q);

				if (y > rate) {

					answ = *p; anss = *q;

					rate = y;

				}



			}	

			

		}

	}

	cout << answ+anss << " " << anss << endl;

	return 0;

}