Amides of poly (thio)phosphonic acids