There are some mangoes and pears at a fruit stall. If 16 mangoes are sold, the ratio of the number of mangoes to the number of pears would be 1 : 4. If 16 pears are sold instead, the number of mangoes would be 1⁄3 the number of pears. How many fruits are there altogether?