[PD] Yin algorithm