from stack import Stack


def redudant(s, string):
    count = 0
    for i in string:
        if i == ')':
            for j in range(s.size() - 1):
                if s.top() == '(':
                    count = 0
                else:
                    count += 1
                s.pop()
        else:
            s.push(i)
    if count == 0:
        return True
    else:
        return False


s = Stack()
string = input()
print(redudant(s, string))

aa422beeb7bf349801f3ddd731fbdc1634a67d09
<mask token>


def redudant(s, string):
    count = 0
    for i in string:
        if i == ')':
            for j in range(s.size() - 1):
                if s.top() == '(':
                    count = 0
                else:
                    count += 1
                s.pop()
        else:
            s.push(i)
    if count == 0:
        return True
    else:
        return False


<mask token>

<mask token>


def redudant(s, string):
    count = 0
    for i in string:
        if i == ')':
            for j in range(s.size() - 1):
                if s.top() == '(':
                    count = 0
                else:
                    count += 1
                s.pop()
        else:
            s.push(i)
    if count == 0:
        return True
    else:
        return False


<mask token>
print(redudant(s, string))

<mask token>


def redudant(s, string):
    count = 0
    for i in string:
        if i == ')':
            for j in range(s.size() - 1):
                if s.top() == '(':
                    count = 0
                else:
                    count += 1
                s.pop()
        else:
            s.push(i)
    if count == 0:
        return True
    else:
        return False


s = Stack()
string = input()
print(redudant(s, string))

from stack import Stack


def redudant(s, string):
    count = 0
    for i in string:
        if i == ')':
            for j in range(s.size() - 1):
                if s.top() == '(':
                    count = 0
                else:
                    count += 1
                s.pop()
        else:
            s.push(i)
    if count == 0:
        return True
    else:
        return False


s = Stack()
string = input()
print(redudant(s, string))
