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