#import <stdio.h>
int main(){
    int A,B,C,D,E,F;
    scanf("%d %d %d %d %d %d",&A,&B,&C,&D,&E,&F);
    int maxX = A;
    int maxZ = 0;
    double maxZX = 0;
    int x=0;
    while(1){
        if(100*A*x>F){
            break;
        }
        int y=0;
        while(1){
            int X = 100*A*x+100*B*y;
            if (X>F) {
                break;
            }
            int z=0;
            while(1){
                if (C*z > F-X || 100*C*z > E*X) {
                    break;
                }
                int w=0;
                while(1){
                    int Z = C*z+D*w;
                    if (Z>F-X || 100*Z>E*X) {
                        break;
                    }
                    double ZX = (double)Z/X;
                    if (ZX > maxZX) {
                        maxX = X;
                        maxZ = Z;
                        maxZX = ZX;
                    }
                    w++;
                }
                z++;
            }
            y++;
        }
        x++;
    }
    printf("%d %d",maxX+maxZ, maxZ);
}
