Theoretical investigation of the relative stability of XAAX and its isomer X2A2 (X = H, F, Cl, Br, I, Li, Na, and A = S, O)