using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

public class AtCoderA
{
    static void Main()
    {
        var sc = new Scanner();

        int a = sc.NextInt();
        int b = sc.NextInt();
        int c = sc.NextInt();
        int d = sc.NextInt();
        int e = sc.NextInt();
        int f = sc.NextInt();

        int answerW = 0;
        int answerS = 0;
        float max = 0;
        for (int i = 0; i <= 30; i++)
        {
            if (a * i * 100 > f)
            {
                break;
            }
            for (int j = 0; j <= 30; j++)
            {
                int water = a * i * 100 + b * j * 100;
                if(water == 0)
                {
                    continue;
                }
                int diff = f - water;
                if (diff < 0)
                {
                    break;
                }
                int limit = Math.Min(water / 100 * e, diff);
                int maxSuger = 0;
                for (int k = 0; k <= 3000; k++)
                {
                    int sugerC = k * c;
                    if (sugerC > limit)
                    {
                        break;
                    }
                    for (int l = 0; l <= 3000; l++)
                    {
                        int sugerD = l * d;
                        if (sugerC + sugerD > limit)
                        {
                            break;
                        }
                        maxSuger = Math.Max(maxSuger, sugerC + sugerD);
                    }
                }
                float density = (float)(maxSuger * 100) / (float)(water + maxSuger);
                if (max <= density)
                {
                    max = density;
                    answerW = water + maxSuger;
                    answerS = maxSuger;
                }
            }
        }

        Console.WriteLine(answerW + " " + answerS);
    }

    class Scanner
    {
        private string[] _line;
        private int _index;
        private const char Separator = ' ';

        public Scanner()
        {
            _line = new string[0];
            _index = 0;
        }

        public string Next()
        {
            while (_index >= _line.Length)
            {
                _line = Console.ReadLine().Split(Separator);
                _index = 0;
            }

            return _line[_index++];
        }

        public int NextInt() => int.Parse(Next());
        public long NextLong() => long.Parse(Next());
        public double NextDouble() => double.Parse(Next());
        public decimal NextDecimal() => decimal.Parse(Next());
        public char NextChar() => Next()[0];
        public char[] NextCharArray() => Next().ToCharArray();

        public string[] Array()
        {
            _line = Console.ReadLine().Split(Separator);
            _index = _line.Length;
            return _line;
        }

        public int[] IntArray() => Array().Select(int.Parse).ToArray();
        public long[] LongArray() => Array().Select(long.Parse).ToArray();
        public double[] DoubleArray() => Array().Select(double.Parse).ToArray();
        public decimal[] DecimalArray() => Array().Select(decimal.Parse).ToArray();
    }
}

Measured memory_bytes: 13140