The YPG militia has withdrawn some fighters and weaponry from two areas, Kurdish officials say.