#P29. [KBC001D] Determine
[KBC001D] Determine
Source
This problem is adapted from Long Long OJ. All rights reserved.
Description
Determine whether the input is an octal integer/hexadecimal integer/decimal real number (possibly negative).
If the input is a number:
- There is a before octal.
- There is a before hexadecimal.
- The end of decimal real numbers is allowed to have zeros.
- Numbers equal to are not allowed to have a negative sign.
- All numbers have no redundant leading zeros or negative signs.
- Decimal real numbers less than are not allowed to omit the integer part ().
It is guarateed that:
- Input is not empty.
- The input length does not exceed .
- Input only contains negative signs, numbers, and lowercase letters.
Input
The input is given from Standard Input in the following format:
$\color{#cccccc}\boxed{\color{white}{\large{|}}\color{black}s\color{white}{\large{|}}}$
Output
Print Yes
if meets the requirements, and No
otherwise.
Samples
1234567.98
Yes
0x123abc
Yes
-01243
Yes
1a2b3c
No