Without loss of generality, we can assume that p and q are coprime. If there were p and q such that p⁄q=√12 where p and q aren't coprime, we can divide p and q each by all of their common factors to get new p and q which are coprime (in other words, p/q can always be simplified further if p and q aren't coprime)