Is this a function

X: 1, 2, 3, 4, 5
Y: -8, -6, -1, -2, -4

Yes, this is a function. Each input value from set X maps to exactly one output value from set Y.