Suppose there are $$x$$ ducks in the yard. Since there is an equal number of pigs, ducks and chickens, $$2x+4x+2x=144$$, $$x=18$$. 
In the yard there is an equal number of pigs, ducks and chickens. Together, they have $$144$$ legs. How many ducks are there in the yard? 
Options:
[A] $$18$$ 
[B] $$21$$ 
[C] $$35$$ 
[D] $$42$$ 
[E] $$43$$ 