For this Question: Jerry has recently learned about BODMAS rule, so he is highly curious about brackets. He is currently aware of 3 kinds of brackets, "()", "{}", and "[]".
A correct bracket sequence is a bracket sequence that can be transformed into a correct arithmetic expression by inserting characters "1" and "+" between the original characters of the sequence. For example, bracket sequences "()[]", "({})" are correct (the resulting expressions are: "(1)+[1]", "({1+1}+1)" ). while the bracket sequences ")(" and "[" are not correct.

Given a bracket sequence please tell Jerry whether the bracket sequence is correct or not.The first line of the input contains an integer N, the length of the bracket sequence. The next line of the input contains a string denoting the bracket sequence.

<b>Constraints</b>
4 ≤  N ≤ 10^5Print "YES" without quotes if the bracket sequence is correct, else print "NO".Sample Input 1
8
({}[])[]

Sample Output 1
YES

Sample Input 2
6
([][)]

Sample Output 2
NO, I have written this Solution Code: def check(ch, ch1):
	if((ch == '}' and ch1 != '{') or (ch == ']' and ch1 != '[') or (ch == ')' and ch1 != '(')):
		return False
	return True

n = int(input())
s = input()

li = []
flag = True
for ch in s:
	if(ch == '(' or ch == '[' or ch == '{'):
		li.append(ch)
		
	else:
		
		if((len(li) > 0 and not check(ch, li[-1])) or len(li) == 0):
			flag = False
			break
		if(len(li) > 0):
			li.pop()
		

if(flag and len(li) == 0):
	print("YES")
else:
	print("NO"), In this Programming Language: Python, Now tell me if this Code is compilable or not?