Two metals $$X$$ and $$Y$$ belong to the second group of periodic table. $$X$$ forms insoluble oxide but soluble sulphate. $$Y$$ forms a soluble oxide but insoluble sulphate. Hydroxide of metal $$X$$ is soluble in $$NaOH$$ while that of metal $$Y$$ is insoluble in $$NaOH.$$ What are metals $$X$$ and $$Y?$$