f | import re | f | import re |
t | r = re.compile('(?:(?:(?:-?[1-9]\\d*)|0)|(?:(?:%0x0|(?:-?%0x[1-9a-f][0-9 | t | pattern = re.compile('^-?(%0x[0-9a-fA-F]{1,16}|%0o[0-7]{1,8}|%0b[01]{1,2 |
| a-f]{,15})))|(?:(?:%0b0|(?:-?%0b1[01]{,19})))|(?:(?:%0o0|(?:-?%0o[1-7][0 | | 0}|[1-9][0-9]*|0)(\\.(0*%0x[0-9a-fA-F]{1,16}|0*%0o[0-7]{1,8}|0*%0b[01]{1 |
| -7]{,7}))))(?:(?:\\.0*(?:(?:(?:[1-9]\\d*)|0)|(?:(?:%0x0|(?:-?%0x[1-9a-f] | | ,20}|[0-9]+|0))?(E([+-](%0x[0-9a-fA-F]{1,16}|%0o[0-7]{1,8}|%0b[01]{1,20} |
| [0-9a-f]{,15})))|(?:(?:%0b0|(?:%0b1[01]{,19})))|(?:(?:%0o0|(?:%0o[1-7][0 | | |[1-9][0-9]*|0))?)?$') |
| -7]{,7})))))?E(?:[+-](?:(?:(?:[1-9]\\d*)|0)|(?:(?:%0x0|(?:-?%0x[1-9a-f][ | | |
| 0-9a-f]{,15})))|(?:(?:%0b0|(?:%0b1[01]{,19})))|(?:(?:%0o0|(?:%0o[1-7][0- | | |
| 7]{,7})))))?)?') | | |
| if r.fullmatch(input()): | | if pattern.match(input()): |
| print('YES') | | print('YES') |
| else: | | else: |
| print('NO') | | print('NO') |