One-third of the candidates for a job were 25 years old or younger. Two-sevenths of the candidates were at least 50 years old. If 84 people applied for the job, how many were between 25 and 50?