Two industries, A and B, supply each other. To make one unit, A uses a half unit of its own output and a quarter unit of B's output. To make one unit, B uses a fifth of a unit of A's output and two fifths of a unit of its own. The outside demand is 10 units of A and 20 units of B. Each industry produces exactly enough for the outside demand and for what both industries use up. What is the total output of both industries, in units?