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

namespace AtCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            //[summary]C - Sugar Water
            var line = ReadLine();
            int A = line[0];
            int B = line[1];
            int C = line[2];
            int D = line[3];
            int E = line[4];
            int F = line[5];

            //最大でどの位の水が入るのか、倍率を求める
            int magnification = F / (100 + E);

            //取り得る水の量のパターンをすべて列挙
            var waters = GetWaters(A, B, magnification);
            waters = waters.Distinct().OrderBy(x => x);

            if (waters.Count() == 0)
            {
                Console.WriteLine("{0} {1}", F, F - A * 100);
            }
            else
            {
                var sugarWaters = new List<SugarWater>();

                foreach (var water in waters)
                {
                    //投入できる最大の砂糖の量
                    int upper = E * water;

                    //C,Dの組み合わせで、実際の最大量は少なくなる可能性あり
                    int sugar = GetMaxSugar(C, D, upper);

                    int weight = water * 100 + sugar;
                    double percent = (double)sugar / weight * 100;

                    sugarWaters.Add(new SugarWater(weight, sugar, percent));
                }

                var q = sugarWaters.OrderByDescending(x => x.Percent).First();

                Console.WriteLine("{0} {1}", q.Weight, q.Sugar);
            }
        }

        static IEnumerable<int> GetWaters(int A, int B, int upper)
        {
            for (int i = 0; i <= upper; i++)
            {
                for (int j = 0; j <= upper; j++)
                {
                    int water = A * i + B * j;

                    if (water > upper)
                    {
                        break;
                    }
                    else
                    {
                        if (water > 0)
                        {
                            yield return water;
                        }
                    }
                }
            }
        }

        static int GetMaxSugar(int C, int D, int upper)
        {
            int max = 0;

            for (int i = 0; i <= upper; i++)
            {
                for (int j = 0; j <= upper; j++)
                {
                    int sugar = C * i + D * j;

                    if (sugar > upper)
                    {
                        break;
                    }
                    else
                    {
                        if (sugar > max)
                        {
                            max = sugar;
                        }
                    }
                }
            }

            return max;
        }

        static List<int> ReadLine()
        {
            var line = Console.ReadLine();
            var array = line.Split(' ');

            return array.Select(x => int.Parse(x)).ToList();
        }
    }

    struct SugarWater
    {
        public int Weight { set; get; }
        public int Sugar { set; get; }
        public double Percent { set; get; }

        public SugarWater(int weight, int sugar, double percent)
        {
            Weight = weight;
            Sugar = sugar;
            Percent = percent;
        }
    }
}

Measured memory_bytes: 13532