Verification of Valid Bracket Sequence#4433

Verification of Valid Bracket Sequence

1 секунда
64 мегабајта
Врло лако

A sequence of round, square, and curly brackets is provided.

Your task is to determine if this sequence is a valid bracket sequence.

Улаз

The input file contains a bracket sequence with a maximum length of characters.

Излаз

Print YES if the bracket sequence is valid, and NO if it is not.

Примери

Пример 2

Loading
Loading

Пример 3

Loading
Loading