Answer:
Step-by-step explanation:
Elements on the right side of the periodic table are very likely to form negative ions -- all of those except elements in the 8th or 18th column (depending on how your periodic table is numbered).
K and Mg are on the left side, so they will not form negative ions.
They give up 1 (for K) electron and 2 (for Mg) electrons which will leave plus charges for the ions.
On the other hand S and I are on the right side of the periodic table. They will take on electrons and hence be charged with a minus.