If Ram lives in the first floor, then Sham lives in the second. Sham does live on the second floor. Therefore--

Answer: 
Ram lives on the first floor.
If Ram lives in the first floor, then Sham lives in the second. Sham does live on the second floor. Therefore--