        static bool TakeInput()
        {
            string[] materials = Console.ReadLine()
                                        .Split(' ')
                                        .Where(p => !string.IsNullOrWhiteSpace(p))
                                        .ToArray();
            
            for (int i = 0; i < materials.Length - 1; i += 2)
            {