Masha bought red, green, and yellow balloons for a party. She bought 40 red balloons. The number of green balloons Masha bought is 3/5 of the number of red balloons. The number of green balloons is also 2/3 of the number of yellow balloons.