#include<iostream>
using namespace std;
int a,b,c,d,e,f;
int s,t;
double u;
bool visited[3001][3001];
void dfs(int x, int y)
{
    if(x+y>f || visited[x][y] || 100.0*y/x>e) return;
    visited[x][y]=true;
    if(100.0*y/(x+y)>=u){
        u=100.0*y/(x+y);
        s=x, t=y;
    }
    dfs(x+a*100, y);
    dfs(x+b*100, y);
    dfs(x, y+c);
    dfs(x, y+d);
}
int main()
{
    cin>>a>>b>>c>>d>>e>>f;
    dfs(0, 0);
    cout<<s+t<<' '<<t<<endl;
}
