#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
typedef long double ld;
//typedef tree<int,null_type,less<int >,rb_tree_tag,tree_order_statistics_node_update>indexed_set;
template<class T1, class T2>
ostream &operator <<(ostream &os, pair<T1,T2>&p);
template <class T>
ostream &operator <<(ostream &os, vector<T>&v);
template <class T>
ostream &operator <<(ostream &os, set<T>&v);
template <class T1, class T2>
ostream &operator <<(ostream &os, map<T1,T2>&v);
#ifdef APURBA
#define HERE cout<<"here - "<<__LINE__<<"\n";
#define debug(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string> it)
{
    cout<<endl;
}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args)
{
    cout << *it << " = " << a << " ";
    err(++it, args...);
}
#else
#define HERE
#define debug(args...)
#endif
const int N = 2e5+5;
const ll mod = 998244353 ;
typedef pair<int,int> pii;

struct frac
{
    int num, den;
    frac()
    {
        num = 0;
        den =0;
    }
    frac(int a, int b){
        if(a<0 && b<0)
        {
            a= - a;
            b = -b;
        }
        if(b!=0){
            num=a;
            den=b;
        }
        else num=den=0;
    }
    void setvalue(int a, int b){
        if(a<0 && b<0)
        {
            a= - a;
            b = -b;
        }
        if(b!=0){
            num=a;
            den=b;
        }
        else num=den=0;
    }
    friend frac operator+(frac A, frac B)
    {
        return frac(A.num*B.den+A.den*B.num, A.den*B.den);
    }
    friend frac operator-(frac A, frac B)
    {
        return frac(A.num*B.den-A.den*B.num, A.den*B.den);
    }
    friend frac operator * (frac A, frac B)
    {
        return frac(A.num*B.num, A.den*B.den);
    }
    friend frac operator / (frac A, frac B)
    {
        return frac(A.num*B.den, A.den*B.num);
    }
    friend frac inverse(frac A)
    {
        return frac(A.den, A.num);
    }
    friend ostream& operator << (ostream& out, frac A)
    {
        out << "(" << A.num << "/" << A.den << ")";
        return out;
    }
    ld value()
    {
        return (num*1.0l)/(den*1.0l);
    }
    friend bool is_negative(frac A)
    {
        return (A.num<0)^(A.den<0);
    }
    friend bool operator == (frac A, frac B)
    {
        return A.num==B.num && A.den==B.den;
    }
    friend bool operator < (frac A, frac B)
    {
        return is_negative(A-B);
    }
    friend bool operator <= (frac A, frac B)
    {
        return A<B || A==B;
    }
    friend bool operator > (frac A, frac B)
    {
        return is_negative(B-A);
    }
    friend bool operator >= (frac A, frac B)
    {
        return A>B || A==B;
    }
    void show()
    {
        cout<<den<<" "<<num<<"\n";
    }
};

void TEST_CASES(int cas)
{
    int a,b,c,d,e,f;
    cin>>a>>b>>c>>d>>e>>f;
    vector<int>w;
    vector<int>s;
    for(int i=0;i<=31;i++)
    {
        for(int j=0;j<=31;j++)
        {
            if(i==0 && j==0)
                continue;
            if(100*a*i + 100*b*j <= f)
                w.push_back(100*a*i + 100*b*j);
        }
    }
    for(int i=0;i<=3002;i++)
    {
        for(int j=0;j<=3002;j++)
        {
            if(c*i + d*j <= f)
                s.push_back(c*i + d*j );
        }
    }
    sort(w.begin(),w.end());
    w.resize(distance(w.begin(),unique(w.begin(), w.end())));
    sort(s.begin(),s.end());
    s.resize(distance(s.begin(),unique(s.begin(), s.end())));
    debug(w);
    debug(s);
    frac ff(-1,1);
    for(int i=0;i<w.size();i++)
    {
        int now = w[i];
        int lagbe = (e*now)/100;
        if(now+lagbe>f)
        {
            lagbe = f- now;
        }
        int id= lower_bound(s.begin(),s.end(),lagbe)-s.begin();
        if(s[id]>lagbe)
        {
            id--;
        }
        int eta=  s[id];
        assert(eta+now<=f);
        frac tmp(eta,eta+now);
        if(ff<=tmp)
        {
            ff= tmp;
        }
    }
    ff.show();
}



/*
1 1 30 30 100 100
*/

int main()
{
#ifndef APURBA
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
#endif
    //freopen("input.txt","r",stdin);
    //freopen("out1.txt","w",stdout);

    int t=1,cas=0;
    //cin>>t;
    while(t--)
    {
        TEST_CASES(++cas);
    }
    return 0;
}



template<class T1, class T2>
ostream &operator <<(ostream &os, pair<T1,T2>&p)
{
    os<<"{"<<p.first<<", "<<p.second<<"} ";
    return os;
}
template <class T>
ostream &operator <<(ostream &os, vector<T>&v)
{
    os<<"[ ";
    for(int i=0; i<v.size(); i++)
    {
        os<<v[i]<<" " ;
    }
    os<<" ]";
    return os;
}

template <class T>
ostream &operator <<(ostream &os, set<T>&v)
{
    os<<"[ ";
    for(T i:v)
    {
        os<<i<<" ";
    }
    os<<" ]";
    return os;
}
template <class T1, class T2>
ostream &operator <<(ostream &os, map<T1,T2>&v)
{
    for(auto i:v)
    {
        os<<"Key : "<<i.first<<" , Value : "<<i.second<<endl;
    }
    return os;
}


Measured memory_bytes: 4176