# 1,2-dibromopropane reaction with OH and NaNH2 [duplicate]

We have the reaction of the alkyl halide $\ce{CH3-CHBr-CH2Br}$ with 1) $\ce{OH-}$ 2) $\ce{NaNH2}$ The answer is propyne.

I am unable to understand why we have performed an elimination reaction here. Why can't it be a substitution reaction instead? Also, how do we decide which two carbon atoms would lose their hydrogen atoms? (as in elimination, there are two choices for losing the $\ce{H}$ atom - from left and right carbon respectively)