def METHOD_NAME(ss):
    """
    Parses a secondary structure denoted by a well parenthesized expression.
    @param ss (string): Vienna-formatted secondary structure.
    @return list: Set of base-pairs in secondary structures.
    """
    p = []
    res = []
    for i,c in enumerate(ss):
        if c == "(":
            p.append(i)
        elif  c == ")":
            j = p.pop()
            res.append((j,i))
    return set(res)