Jacob and Zain take pencils from a box of $$21$$ pencils without replacing them. On Monday Jacob takes $$\frac{2}{3}$$ of the number of pencils that Zain takes. On Tuesday Jacob takes $$\frac{1}{2}$$ of the number of pencils that Zain takes. On Wednesday morning the box is empty. How many pencils does Jacob take? 
Overseas Competition->Knowledge Point->Word Problem Modules->Equation Word Problems->Indefinite Equation Word Problems
Let the number of pencils Zain takes on Monday and Tuesday be $$x$$ and $$y $$ respectively. Therefore $$x+\frac{2}{3}x+y+\frac{1}{2}y=21$$. Hence, when we multiply the equation through by $$6$$ to eliminate the fractions and simplify, we obtain $$10x+9y =126$$. Since $$x$$ and $$y$$ are both positive integers and since the units digit of $$10x$$ is $$0$$, the units digit of $$9y$$ is $$6$$ and hence $$y=4$$. Therefore $$x=9$$ and hence the number of pencils Zain takes is $$9+4=13$$. Therefore the number of pencils Jacob takes is $$21-13= 8$$. 