Solution (source code)

= Solution

Every particular card is second with <probability>
$$
\sum_{\text{999 other first cards}}\frac1{1000}\frac1{999}
=\frac1{1000}.
$$
Hence \b[$X$ and $Y$ have the same distribution], with means zero and variances one. They are not <independent>, since a card cannot be drawn twice.

Every ordered pair of distinct cards has <probability> $1/(1000\cdot999)$. Therefore
$$
\begin{aligned}
\operatorname{Cov}(X,Y)=\mathbb E[XY]
&=\frac{\sum_{i\ne j}a_i a_j}{1000\cdot999}\\
&=\frac{(\sum_i a_i)^2-\sum_i a_i^2}{1000\cdot999}
=\boxed{-\frac1{999}}.
\end{aligned}
$$
This negative <covariance> is the effect of <sampling without replacement>, not a contradiction of their identical marginals.