Hi, and welcome
Generally speaking, there is no real rule that you can memorize. That is, there is no pattern that tells you whether an antonym can be formed with im-, un-, in-, etc.
Sometimes there seems to be a pattern...
impossible
improbable
impatient
but then comes
paid >>
unpaid
and spoils it
Overall, you just have to memorize them "as they are".