If the ratio of the return variances of stock A to stock B is denoted by q, find the portfolio weights for the two stocks that generate a riskless portfolio if the returns of the two stocks are
(a) perfectly negatively correlated or
(b) perfectly positively correlated.