ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Сборники > C. T. 2011 > задача:


Brackets

Задачи сборника

• Bfs
• Heap
• Chess
• Profits
• Tickets
• Flowers
• Triangle
• Istanbul
• Brackets
• T-shirts
• Dijkstra
• Big Dance
• Bookshelf
• Coin Game
• Butterfly
• Word power
• Buying hay

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 1000/1000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.

Problem Description

You are given a sequence of round, square and curly brackets. Determine whether it is correct or not.

Input

There is a sequence of round ('(', ')'), square ('[', ']') and curly ('{', '}') brackets in a single line of input. The length of sequence is between 1 and 255.

Output

Write YES to output if the sequence is correct, and NO otherwise.

Example

input output

([])

YES

(({)}) NO

 

Для отправки решений необходимо выполнить вход.

www.contester.ru