Interaction of polyamines with Mg2+ and Ca2+