#C8789. Spl-Number Checker

    ID: 52809 Type: Default 1000ms 256MiB

Spl-Number Checker

Spl-Number Checker

Given a binary number, determine whether it is a Spl-Number. A binary number is considered a Spl-Number if and only if it contains exactly one segment of consecutive 1's. In other words, there should be only one contiguous block of one or more 1's in the entire string.

For example, the binary number "1000" has one segment of consecutive 1's and is therefore a Spl-Number, while "1010" has two separate segments of 1's and is not a Spl-Number.

Your task is to read the binary number from the standard input and print YES if it is a Spl-Number, or NO otherwise.

Note: All formulas and conditions mentioned in the problem follow the standard LaTeX format for mathematical expressions where needed.

inputFormat

Input is provided via standard input (stdin) and consists of a single line containing a binary number (a string of the characters '0' and '1').

outputFormat

Output a single line to standard output (stdout) which is either YES or NO. The output should be YES if the binary number contains exactly one segment of consecutive 1's, and NO otherwise.

## sample
1
YES