There are 150 mangoes in basket p and basket q. 1/4 of the mangoes in basket p were yellow and the rest were green. 3/5 of the mangoes in basket q were yellow and the rest green. The number of green mangoes in both baskets were equal. How many yellow mangoes were there altogether?