Use System|Pick Sprite Instance nth as a sub-event under the collision/overlap event.
As a subevent after a collsion event there are only two instance to pick. The two instances that are overlap.
It would look like this:
Sprite| Is overlapping Sprite
...System|Pick Sprite Instance 0 -> Do something with the Sprite with the lower UID than the other.
If you use 1 then you pick the Instance with the higher UID from both.
To pick the UID from each one do this.
Sprite| Is overlapping Sprite -> System| Set myUID1 to Sprite.UID
...System|Pick Sprite Instance 1 -> System| Set myUID2 to Sprite.UID