Correspondence between two tensors

I have a tensor X = (B, 2) and another tensor Y= (b, 2), where Y is a subset of X (B>=b), how can I return the indices of the values of Y in X.
for example,
X=(
[1, 2],
[4,5],
[3,1],
[7,8])

Y=(
[1, 2]
[7, 8])

I want return [0, 2].