Implement the function can_rearrange_necklace(s: str) -> str that determines if a necklace made of links and pearls can be rearranged such that pearls are evenly spaced.
Functionality:
Count the number of links in the necklace represented by '-' and the number of pearls represented by 'o'.
If there are no pearls, return 'YES', as any arrangement is valid.
If the number of links is evenly divisible by the number of pearls, return 'YES'.
Otherwise, return 'NO'.
Input/Output Requirements:
Input: A single string s where characters are either '-' (for links) or 'o' (for pearls).
Output: A string that can either be 'YES' or 'NO'.
File Requirement:
Implement the solution in a file named /app/solution.py.