KMP, LCM