#include<bits/stdc++.h>

using namespace std;

#define PF           printf
#define SF(n)        scanf("%d", &n)
#define SFF(a,b)     scanf("%d %d", &a, &b)
#define SFFF(a,b,c)  scanf("%d %d %d", &a, &b, &c)
#define INF_I        2147483647    //max limit
#define INF          1999999999
#define PB           push_back
#define MEM(n, val)  memset((n), val, sizeof(n))
#define F            first
#define S            second
#define FOR(i, a, b) for(int i = a; i <= b; i++)
#define ROF(i, a, b) for(int i = a; i >= b; i--)
#define ALL(c)       c.begin(), c.end()
#define BOOST        std::ios_base::sync_with_stdio(false);
#define INP          freopen("in.txt", "r", stdin);
#define OUT          freopen("out.txt", "w", stdout);
#define MP           make_pair
#define INIT_RAND    srand(time(NULL))
#define MOD          1000000007
#define MX           50010
#define PI           acos(-1.0)
#define eps          1e-9

#define cnd tree[node]
#define lnd tree[(node * 2)]
#define rnd tree[((node * 2) + 1)]

typedef long long LL;
typedef unsigned long long ULL;
typedef pair<int, int> PII;
typedef pair<long long, long long> PLL;
typedef priority_queue<int> P_Q;
typedef queue<int> Q;
typedef stringstream SS;

#define infL 1000000000000000000LL

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

bool is_valid(int water, int sugar) {
    if((100.0 * sugar / (double)e) <= (double)water) {
        return 1;
    }
    return 0;
}

double den;
pair<int, int> ans;

bool vis[5][3010][3010];

void func(int pos, int water, int sugar)  {
    if(vis[pos][water][sugar])  {
        return;
    }
    if(pos == 4)    {
        if(is_valid(water, sugar))  {
            if(((sugar * 100.0) / (double)(water + sugar)) >= den)    {
                den = ((sugar * 100.0) / (double)(water + sugar));
                ans = MP(water + sugar, sugar);
            }
        }
        return;
    }
    if(pos == 0)    {
        int sum = water;
        for(;;)   {
            func(pos + 1, sum, sugar);
            if(sum + (100 * a) > f) {
                break;
            }
            sum += (100 * a);
        }
    }
    if(pos == 1)    {
        int sum = water;
        for(;;)   {
            func(pos + 1, sum, sugar);
            if(sum + (100 * b) > f) {
                break;
            }
            sum += (100 * b);
        }
    }
    if(pos == 2)    {
        int sum = sugar + water;
        for(;;)   {
            func(pos + 1, water, sum - water);
            if((sum + c > f) || (!is_valid(water, sum - water))) {
                break;
            }
            sum += c;
        }
    }
    if(pos == 3)    {
        int sum = sugar + water;
        for(;;)   {
            func(pos + 1, water, sum - water);
            if((sum + d > f) || (!is_valid(water, sum - water))) {
                break;
            }
            sum += d;
        }
    }
    vis[pos][water][sugar] = 1;
}

int main()  {
    ///INP;
    BOOST;
    cin >> a >> b >> c >> d >> e >> f;
    den = 0;
    func(0, 0, 0);
    /**
    cout << (934.0 * 100.0) / (2634.0) << "\n";
    cout << is_valid(1700, 934) << "\n";
    cout << (932.0 * 100.0) / (2632.0) << "\n";
    cout << den << "\n";
    */
    cout << ans.F << " " << ans.S;
    return 0;
}
/**
*/


Measured memory_bytes: 26880