goin to sleep guys. Thanks for answers. Elcid, Udithag, Yasho all three of you solved it very well. Will try to find a harder question for you guys. :)
I can't remember AL maths any more. It's been many years since I touched them. But will post more logic q's if i find them. Have a good nite! :D