3. The circus bought some red balloons, yellow balloons, and blue balloons to decorate a circular stage. At equal intervals, one red balloon was tied, using up exactly the 40 red balloons bought. Then, one yellow balloon was tied at equal intervals between each adjacent pair of red balloons, resulting in a shortage of 3 yellow balloons. Finally, one blue balloon was tied between each adjacent pair of balloons, using up all the blue balloons. Therefore, the number of yellow balloons and blue balloons bought by the circus are $\qquad$ and $\qquad$ respectively.
【Analysis】 37, 77. There are $40-3=37$ yellow balloons; there are $40+37=77$ blue balloons.