A teenager who subjected two children to sexual assaults on the same day has been jailed for five years.