Problem Description

One line has space-separated tokens. For each token, print YES if it is a valid base-10 integer format: optional leading '-' and digits, and no leading zeros unless the number is exactly 0. Else print NO.

Input Format

One line tokens.

Output Format

One line YES/NO per token (space separated).

Sample Test Case

Input:
0 00 -0 12 -12 012 5a
Output:
YES NO YES YES YES NO NO

Constraints

Total characters up to 2e5.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next