Combine two feature vectors for a correct input of a neural network
The easiest way can be the concatenation of the feature vectors to create a single feature vector for each sample.

Assume the first sample is made of the pair $X_1$ and $Y_1$. Let the corresponding feature vectors for $X_1$ and $Y_1$ be $\textbf{v}_1$ and $\textbf{v}_2$, respectively.

$$
\textbf{v}_1 = [f_1, f_2, \ldots , f_n],\\
\textbf{v}_2 = [g_1, g_2, \ldots , g_m].
$$
Then, the first sample's feature can be defined as
$$
\textbf{v} = [f_1, f_2, \ldots , f_n, g_1, g_2, \ldots , g_m].
$$
Eventually, when you pass the latter feature vector to a machine learning model, it will try to capture the dependencies among all of these features, to learn a solution for your task of interest (i.e. classification).