Opus 5 glitch text

filter:
user

Explain the following

---

assistant

= raw_input()

n = len(t)

low, high = 0, 0

for i in range(n):

if t[i] == '(':

low += 1

high += 1

elif t[i] == ')':

low -= 1

high -= 1

else:

low -= 1

high += 1

if high < 0:

break

low = max(low, 0)

print("YES" if low == 0 and high >= 0 else "NO")