Welcome to Healthcare Magic
The inverted nipples need to be sucked out to normal everted state to prevent infections. The Doctors will show you how to use a syringe to do that. The yellowish material could be inspissated milk collection. In case it pains it could be pus from a developing breast abscess
. Don;t delay, get it treated by your Doctor. Your baby needs to be fed exclusively by breast milk for atleast 4-6 months for normal growth and development and preventing infections.