#include <bits/stdc++.h>

using namespace std;

#define countof(a) (sizeof(a)/sizeof(*a))

#define vi vector<int>
#define vvi vector<vector<int> >
#define vpi vector<pi >
#define pi pair<int,int>
#define mp make_pair
#define fi first
#define se second
#define all(n) n.begin(), n.end()

#define FROMTO(var, from, to) for (register int var = (from), var##down = ((int)(to)) < ((int)(from));var##down ? (var >= (int)(to)) : (var <= (int)(to));var##down ? var-- : var++)
#define UPTO(var, from, to)   for (register int var = (from); var <= ((int)to); var++)
#define DOWNTO(var, from, to) for (register int var = (from); var >= ((int)to); var--)
#define FOR(var, to)          UPTO(var, 0, (to)-1)
#define DOWN(var, from)       DOWNTO(var, (from)-1, 0) 

#define INIT(var, val) FOR(i,countof(var)) var[i] = val
#define INPUT(var) FOR(i,countof(var)) cin >> var[i]
#define INPUT1(var) FOR(i,countof(var)) cin >> var[i], var[i]--

#define SORT(v) qsort(v,countof(v),sizeof(*v),int_less)
#define SORTT(v) qsort(v,countof(v),sizeof(*v),int_greater)
#define QSORT(v,b) qsort(v,countof(v),sizeof(*v),b)

#define MOD 1000000007
#define INF ((1 << 30)-1)
#define LINF ((1LL << 62)-1)

typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;
typedef int8_t s8;
typedef int16_t s16;
typedef int32_t s32;
typedef int64_t s64;

struct Comb {
    vector<vector<s64> > data;
    Comb(int n) { // O(n^2)
        data = vector<vector<s64> >(n+1,vector<s64>(n+1,1));
        UPTO(i,1,n) {
            FOR(j,i+1) {
                if (!j || j == i) data[i][j] = 1;
                else data[i][j] = data[i-1][j-1] + data[i-1][j];
            }
        }
    }
    
    s64 ncr(int n, int r) {
        return data[n][r];
    }
};

static inline int ri() {
  int a;
  scanf("%d", &a);
  return a;
}

int int_less(const void *a, const void *b) {
  return (*((const int*)a) - *((const int*)b));
}
int int_greater(const void *a, const void *b) {
  return (*((const int*)b) - *((const int*)a));
}

int main() {
	int a = ri(), b = ri(), c = ri(), d = ri(), e = ri(), f = ri();
	int w_dp[f+1];
	INIT(w_dp,0);
	w_dp[0] = 1;
	queue<int> que; que.push(0);
	while(que.size()) {
		auto i = que.front(); que.pop();
		if (i + 100*a <= f && !w_dp[i+100*a]) {
			que.push(i+100*a);
			w_dp[i+100*a] = 1;
		}
		if (i + 100*b <= f && !w_dp[i+100*b]) {
			que.push(i+100*b);
			w_dp[i+100*b] = 1;
		}
	}
	int s_dp[f+1];
	INIT(s_dp,0);
	s_dp[0] = 1; que.push(0);
	while(que.size()) {
		auto i = que.front(); que.pop();
		if (i + c <= f && !s_dp[i+c]) {
			que.push(i+c);
			s_dp[i+c] = 1;
		}
		if (i + d <= f && !s_dp[i+d]) {
			que.push(i+d);
			s_dp[i+d] = 1;
		}
	}
	
	double best_score = 0;
	int best_w = -1;
	int best_s = -1;
	FOR(i,10000) {
		if (i*100 > f) break;
		if (!w_dp[i*100]) continue;
		int s_max = i*e;
		int s = -1;
		DOWN(j,s_max+1) {
			if (i*100 + j > f) continue;
			if (s_dp[j]) {s = j; break;}
		}
		if (!~s) continue;
		double score = ((double)s)/i;
		if (best_score < score) {
			best_score = score;
			best_w = i;
			best_s = s;
		}
	}
	if (!~best_w) {
		cout << 100*a << " 0" << endl;
	} else {
		cout << 100*best_w + best_s << " " << best_s << endl;
	}
    return 0;
}


Measured memory_bytes: 256