On a chicken farm, the poultry is given a healthy diet to gain weight. The chickens have to consume a minimum of 15 units of Substance A and another 15 units of Substance B. In the market there are only two classes of compounds: Type X, with a composition of one unit of A to ﬁve units of B, and another type, Y, with a composition of ﬁve units of A to one of B. The price of Type X is $10 and Type Y, $30. What are the quantities of each type of compound that have to be purchased to cover the needs of the diet with a minimal cost?