def distance_to_center_of_mass(primary_mass, secondary_mass, positions):
    """
    Return distance from primary and from secondary component to center of mass.

    :param primary_mass: float
    :param secondary_mass: float
    :param positions: numpy.array
    :return: Tuple
    """
    distance = positions[:, (1)]
    mass = primary_mass + secondary_mass
    com_from_primary = distance * secondary_mass / mass
    return com_from_primary, distance - com_from_primary
