/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author Gosu_Hiroo
 */

#include <iostream>
#include <fstream>

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
#define tr(container, it) \
        for (auto it = container.begin(); it != container.end(); it++)
#define scontains(c, x) ((c).find(x) != (c).end())   //O(log n)
#define contains(c, x) (find((c).begin(),(c).end(),x) != (c).end()) //O(n)
#define pll pair<ll,ll>
#define pii pair<int,int>
#define mll map<ll,ll>
#define intv(x, a, b)((x)>=a && (x)<=b)
#define  rep(i, _begin, _end) for (__typeof(_end) end = _end, begin = _begin,  i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define  _for(i, end) for (__typeof(end) i = 0, _len = (end); i < (_len); i += 1)
#define all(x) (x).begin(),(x).end()
#define SZ(x) ((int)(x).size())
#define F first
#define S second
#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
#define next asdnext
#define prev asdprev
#define what_is(x) cerr << #x << " is " << x << endl;
#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
#define mod(x, m) ((((x) % (m)) + (m)) % (m))
#define bit(n) (1LL<<(n))
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );
#define readint ({int t;cin >> t;t;})
const double PI = 2 * acos(.0);
const int INF = 0x3f3f3f3f;
const ll LLINF = 1000000000000000005LL;;
const ll MOD = (ll) (1e9) + 7;
void _mod(ll &x){x = mod(x, MOD);}
//const ll MOD = (ll) 998244353 ;
const double EPS = 1e-10;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
    cerr << *it << " = " << a << endl;
    err(++it, args...);
}

template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
    std::fill((T *) array, (T *) (array + N), val);
}

template <typename T>
ostream& operator << (ostream& os, const vector<T> V) {
    for(auto v : V)os << v << " ";
    return os;
}

template <typename T>
ostream& operator << (ostream& os, const set<T> V) {
    for(auto v : V)os << v << " ";
    return os;
}

//#define int ll

class CSugarWater {
public:
    int A, B, C, D, E , F;
    int sum(int a,int b,int c,int d){
        return a * A + b * B + c*C + d*D;
    }
    bool conc(int a, int b, int c, int d){
        return (a*A + b*B)*E >= 100*(c*C + d*D);
    }
    bool sugar(int c, int d){
        return c*C + d*D;
    }
void solve(std::istream& cin, std::ostream& cout) {
    cin >> A >> B >> C >> D >> E >> F;
    double mx = .0;
    int water = 0, sugar = 0;
    A *= 100, B*= 100;
    for(int a = 0;sum(a,0,0,0) <= F && conc(a,0,0,0);a++){
        for (int b = 0; sum(a,b,0,0)<=F && conc(a,b,0,0); ++b) {
            for (int c = 0; sum(a,b,c,0)<=F && conc(a,b,c,0); ++c) {
                for (int d = 0; sum(a,b,c,d)<= F && conc(a,b,c,d); ++d) {
                    if(1.*(c*C + d*D)/(a*A + b*B ) >= mx){
                        mx = 1.*(c*C + d*D)/(a*A + b*B),
                        sugar = c*C + d*D, water = a*A + b*B;
//                        error(a,b,c,d,sum(a,b,c,d))
                    }
//                    what_is(sum(a,b,c,d))
                }
            }
        }
    }
    cout << water + sugar << " " << sugar << endl;



}


};


#undef int
int main() {


	CSugarWater solver;
	std::istream& in(std::cin);
	std::ostream& out(std::cout);
	in.tie(0); ios::sync_with_stdio(0); out<<fixed<<setprecision(20);
	solver.solve(in, out);
	return 0;
}


Measured memory_bytes: 256