Concept:
Cyanide ion (\(CN^-\)) is ambidentate, but in nucleophilic substitution reactions with alkyl halides, it predominantly forms alkyl nitriles (\(R-CN\)).
Step 1: Formation of X.
Alkyl halide + KCN → substitution occurs via carbon end of cyanide:
\[
R-X + KCN \rightarrow R-CN
\]
So, X = CN.
Step 2: Formation of Y.
Another nucleophilic substitution with KCN also gives nitrile due to same bonding preference.
So, Y = CN.
Step 3: Conclusion.
Both products contain \(C \equiv N\) bond in nitrile form.
\[
\boxed{CN, CN}
\]