Which of the following reactions is a synthesis reaction?

N2 + 3H2 → 2NH3

MgI2 + Br2 → MgBr2 + I2

KClO3 → KCl + O2

HCl + NaOH → NaCl + H2O