def sred(A, B):
    avg_A = sum(A) / len(A) if len(A) > 0 else 0
    avg_B = sum(B) / len(B) if len(B) > 0 else 0
    P = (avg_A + avg_B) / 2
    return [avg_A, avg_B, P]

def colvo(C, M):
    up = 0
    down = 0

    for element in C:
        if element > M:
            up += 1
        else:
            down += 1
    
    return up, down
