A gas 'X' is passed through water to form a saturated solution. The aqueous solution on treatment with silver nitrate gives a white precipitate. The saturated aqueous solution also dissolves magnesium ribbon with evolution of a colourless gas 'Y'. Identify 'X' and 'Y'.
(a) X = CO2, Y = Cl2
(b) X = Cl2, Y = CO2
(c) X = Cl2, Y = H2
(d) X = H2, Y = Cl2