#include <iostream>
#include <vector>
#include <deque>
#include <math.h>
#include <set>
#include <iomanip>
#include <time.h>
#include <list>
#include <stdio.h>
#include <queue>
#include <map>
#include <algorithm>
#include <assert.h>
#include <memory.h>

#define mk make_pair
#define sc second
#define fr first
#define pb emplace_back
#define all(s) s.begin(), s.end()
#define sz(s) ( (int)s.size() )
#define ok puts("OK");

using namespace std;

const int N = 3e3 + 5;

int a, b, c, d, e, f, u[N][N], res, cur;

double ans;

void dfs (int v, int x)
{
    u[v][x] = 1;

    if ( v + a * 100 + x <= f && !u[v + a * 100][x])
        dfs(v + a * 100, x);

    if ( v + b * 100 + x <= f && !u[v + b * 100][x])
        dfs(v + b * 100, x);

    if ( v + x + c <= f && e * (v / 100) >= x + c && !u[v][x + c])
        dfs(v, x + c);

    if ( v + x + d <= f && e * (v / 100) >= x + d && !u[v][x + d])
        dfs(v, x + d);
}

main ()
{
    cin >> a >> b >> c >> d >> e >> f;
    dfs(0, 0);
    for (int i = 1; i <= f; i++)
    {
        for (int j = 1; j <= f; j++)
        {
            double x = i, y = j;

            if (u[i][j] && ans < (x + y) / x)
            {
                ans = (x + y) / x;
                cur = i;
                res = j;
            }
        }
    }
    cout << cur + res << " " << res << endl;
}
