Concept:
Carboxylic acids react with ammonia to form amides on heating. Amides undergo Hofmann bromamide degradation to produce primary amines having one less carbon atom.
Step 1: Formation of amide.
Acetic acid reacts with ammonia.
\[
CH_3COOH + NH_3
\rightarrow
CH_3COONH_4
\]
On heating,
\[
CH_3COONH_4
\rightarrow
CH_3CONH_2 + H_2O
\]
Therefore,
\[
X=CH_3CONH_2
\]
(acetamide)
Step 2: Apply Hofmann bromamide reaction.
\[
CH_3CONH_2
\xrightarrow{Br_2/NaOH}
CH_3NH_2
\]
The carbonyl carbon is removed during the reaction.
Step 3: Identify Y.
Hence,
\[
Y=CH_3NH_2
\]
\[
\boxed{CH_3NH_2}
\]