Sequence of Parentheses#209

Sequence of Parentheses

4 seconds
128 megabytes
Very easy (≈850)

A sequence of parentheses is a correct mathematical expression obtained by removing all numbers and operation signs. For example,

1 + ( ( ( 2 + 3 ) + 5 ) + ( 3 + 4 ) ) → ( ( ( ) ) ( ) )

Input

A string consisting of opening and closing parentheses, with a length not exceeding 4 \cdot 10^6, is given.

Output

Print YES if the given sequence of parentheses is correct, otherwise print NO.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading