Step 1: Understand the reaction with air.
Air contains both oxygen and nitrogen. Some reactive metals react with both gases on heating and form oxides as well as nitrides.
Step 2: Examine magnesium and calcium.
Magnesium burns in air forming both magnesium oxide and magnesium nitride:
\[
2Mg+O_2\rightarrow2MgO
\]
\[
3Mg+N_2\rightarrow Mg_3N_2
\]
Similarly, calcium also forms oxide and nitride:
\[
2Ca+O_2\rightarrow2CaO
\]
\[
3Ca+N_2\rightarrow Ca_3N_2
\]
Step 3: Analyze the other options.
Sodium mainly forms oxide/peroxide and does not readily form nitride on burning in air.
Beryllium does not easily react with nitrogen due to its protective oxide layer.
Manganese does not normally form nitride by direct burning in air.
Step 4: Final conclusion.
Hence, the correct pair is
\[
\boxed{Mg,\;Ca}
\]