One angle of a triangle measures 140°. The other two angles are in a ratio of 3:5. What are the measures of those two angles?