2016 fall A question 1

Can I use p and q as integers for the shifters?