/*
ID: hepic
PROG: sabotage
LANG: C++11
*/
#include <bits/stdc++.h>

#define FOR(i, a, b) for(auto i=a; i<=b; ++i)
#define REP(i, a, b) for(auto i=a; i<b; ++i)
#define FORI(i, a, b) for(auto i=a; i!=b+1-2*(a>b); i+=1-2*(a>b))
#define REPI(i, a, b) for(auto i=a-(a>b); i!=b-(a>b); i+=1-2*(a>b))
#define ALL(v) v.begin(),v.end()
#define mp(a, b) make_pair(a, b)
#define pb(a) push_back(a)
#define pf(a) push_front(a)
#define eb(a, b) emplace_back(a, b)
#define fir first
#define sec second
#define what_is(x) cout<<#x<<" is "<<x<<endl;
#define type(x) typeid(x).name()
#define ms(arr, val) memset(arr, val, sizeof(arr))
#define min3(a,b,c) min(min(a,b),c)
#define max3(a,b,c) max(max(a,b),c)
#define PI acos(-1)
#define open_read1 freopen("a.txt", "r", stdin)
#define open_write1 freopen("b.xt", "w", stdout)
#define open_read freopen("team.in", "r", stdin)
#define open_write freopen("team.out", "w", stdout)

using namespace std;

typedef long long LL;
typedef long double LD;
typedef unsigned long long ULL;
typedef pair<double, double> PDD;
typedef pair<int, int> PII;
typedef pair<int, PII> PIPII;
typedef pair<PII, PII> PPIIPII;
typedef pair<LL, LL> PLL;
typedef pair<ULL, ULL> PUU;
typedef pair<LL, PLL> PLPLL;
typedef pair<PLL, PLL> PPLLPLL;
typedef pair<int, LL> PIL;
typedef pair<LL, int> PLI;


template<typename T, typename T1>
ostream& operator << (ostream &out, pair<T, T1> obj)
{
    out<<"("<<obj.first<<","<<obj.second<<")";
    return out;
}


template<typename T, typename T1>
ostream& operator << (ostream &out, map<T, T1> cont)
{
    typename map<T, T1>::const_iterator itr = cont.begin();
    typename map<T, T1>::const_iterator ends = cont.end();

    for(; itr!=ends; ++itr)
        out<<*itr<<" ";
    out<<endl;

    return out;
}


template<typename T>
ostream& operator << (ostream &out, set<T> cont)
{
    typename set<T>::const_iterator itr = cont.begin();
    typename set<T>::const_iterator ends = cont.end();

    for(; itr!=ends; ++itr)
        out<<*itr<<" ";
    out<<endl;

    return out;
}


template<typename T>
ostream& operator << (ostream &out, multiset<T> cont)
{
    typename multiset<T>::const_iterator itr = cont.begin();
    typename multiset<T>::const_iterator ends = cont.end();

    for(; itr!=ends; ++itr)
        out<<*itr<<" ";
    out<<endl;

    return out;
}


template<typename T, template<typename ELEM, typename ALLOC=allocator<ELEM>> class CONT>
ostream& operator << (ostream &out, CONT<T> cont)
{
    typename CONT<T>::const_iterator itr = cont.begin();
    typename CONT<T>::const_iterator ends = cont.end();

    for(; itr!=ends; ++itr)
        out<<*itr<<" ";
    out<<endl;

    return out;
}


template<typename T, unsigned int N, typename CTy, typename CTr>
typename enable_if<!is_same<T, char>::value, basic_ostream<CTy, CTr> &>::type
operator << (basic_ostream<CTy, CTr> &out, const T (&arr)[N])
{
     REP(i, 0, N)
        out<<arr[i]<<" ";
    out<<endl;

    return out;
}


template<typename T>
T gcd(T a, T b)
{
    T min_v = min(a, b);
    T max_v = max(a, b);

    while(min_v)
    {
        T temp = max_v % min_v;
        max_v = min_v;
        min_v = temp;
    }

    return max_v;
}


template<typename T>
T lcm(T a, T b)
{
    return (a*b) / gcd(a, b);
}


template<typename T>
T fast_exp_pow(T base, T exp, T mod)
{
    LL res = 1;

    while(exp)
    {
        if(exp&1)
        {
            res *= base;
            res %= mod;
        }

        exp >>= 1;
        base *= base;
        base %= mod;

    }

    return res % mod;
}

/*#################################################################################################################
#################################################################################################################
#################################################################################################################
#################################################################################################################*/

#define SIZE 3010

int A, B, C, D, E, F;
int best_sum, best_sugar;
bool can_water[SIZE], can_sugar[SIZE];
double max_density;


void fix_water()
{
    ms(can_water, false);
    can_water[100*A] = can_water[100*B] = true;
    
    FOR(i, 0, F)
    {
        if(can_water[i])
        {
            int new_val = i + 100*A;

            if(new_val <= F)
                can_water[new_val] = true;

            new_val = i + 100*B;

            if(new_val <= F)
                can_water[new_val] = true;
        }
    }
}


void fix_sugar()
{
    ms(can_sugar, false);
    can_sugar[C] = can_sugar[D] = true;
    
    FOR(i, 0, F)
    {
        if(can_sugar[i])
        {
            int new_val = i + C;

            if(new_val <= F)
                can_sugar[new_val] = true;

            new_val = i + D;

            if(new_val <= F)
                can_sugar[new_val] = true;
        }
    }
}


int find_water(int val)
{
    FOR(i, val, F)
    {
        if(can_water[i])
            return i;
    }

    return -1;
}



int main()
{
    scanf("%d%d%d%d%d%d", &A, &B, &C, &D, &E, &F);
    
    fix_water();
    fix_sugar();
    
    FOR(sugar, 0, F)
    {
        if(can_sugar[sugar])
        {
            double water_need = 100.0 / (double)E * (double)sugar;
            int water_take = find_water((int)water_need);
            
            if(water_take == -1)
                continue;

            int sum = sugar + water_take;
            double density = (double)(100.0 * (double)sugar) / (double)((double)sugar + (double)water_take);
            
            if(sum <= F  &&  density >= max_density)
            {
                max_density = density;
                best_sum = sum;
                best_sugar = sugar;
            }
        }
    }
    
    if(max_density == 0)
        best_sum = 100 * min(A, B);

    printf("%d %d\n", best_sum, best_sugar);
    return 0;
}

Measured memory_bytes: 256