Step 1: Understanding the Concept
The adrenal cortex and medulla have different embryonic origins.
Step 2: Origins
The adrenal cortex arises from mesoderm (coelomic epithelium).
The adrenal medulla arises from neural crest cells, which are ectodermal, so it acts like a modified sympathetic ganglion.
Step 3: Compare the options
So X is mesoderm and Y is ectoderm, which is the first option.
Final Answer:
The cortex is from mesoderm and the medulla is from ectoderm.
\[ \boxed{\text{(A) }\text{X - Mesoderm, Y - Ectoderm}} \]