import math


def utilityY(c1,c2,rho):
    """Compute the utility of the young agents
    
    Args:
    
    
        c1 (float): consumption of the young generation
        c2 (float): consumption of the old generation
        rho (float): discount parameter
        
        
    Returns:
    
        (float): utility of the old agents
    
    """
    if rho<-1:
        return "rho is too low"
    else:
        return math.log(c1)+ (1/(1+rho))*math.log(c2)