Halogen bonding, a noncovalent interaction between a halogen atom X in one molecule and a negative site in another, plays an important role in fields as diverse as molecular biology, drug design, and crystal engineering. In this work, the H3N center dot center dot center dot XCN center dot center dot center dot SF2 and H3N center dot center dot center dot XCN center dot center dot center dot SO2 (X=F, Cl, Br, I) complexes are theoretically investigated to find ways to enhance the halogen bond interaction. Cooperative effects are found when X center dot center dot center dot N and S center dot center dot center dot N bonds coexist in the same complex. The ab initio calculations are carried out using at the MP2/aug-cc-pVTZ level, through analysis of surface electrostatic potentials V-S(r), interaction energies and the topological analysis based on the quantum theory of atoms in molecules. Particular attention is paid to understand the origin of the X center dot center dot center dot N and S center dot center dot center dot N interactions in the ternary complexes. The cooperativity between both types of the interaction is mainly caused by the electrostatic effects.