A paedophile who sexually assaulted a child and committed a sexual act in front of another more than 30 years ago has been jailed.