import itertools


def ranges_overlap(ranges):
    """Test if ranges overlap

    Args:
        ranges (list): Iterable of pairs (min, max)
    Returns:
         bool: True if ranges overlap each other, False otherwise
    """
    for r1, r2 in itertools.combinations(ranges, 2):
        if r1[1] > r2[0] and r1[0] < r2[1]:
            return True
    return False