Write a function to determine if a given system configuration is optimal based on specified constraints.
Treat each component as independently selectable. Each component has power, memory, and benefit values. The configuration is optimal if its selected components satisfy both resource limits and produce the maximum possible total benefit.
Function signature: def is_optimal_configuration(components, selected, power_limit, memory_limit):.
components is a list of dictionaries, selected is a list of component indices, and the function returns a Boolean.
Example: components [{'power': 2, 'memory': 3, 'benefit': 5}, {'power': 3, 'memory': 2, 'benefit': 6}], selected [1], limits 3, 2 returns True. Selecting both exceeds the limits.
def is_optimal_configuration(components, selected, power_limit, memory_limit):