13 lines
217 B
Python
13 lines
217 B
Python
|
import re
|
||
|
import sys
|
||
|
|
||
|
pattern = re.compile(r"(^((?!T)[A, G, C, U])*$)|(^((?!U)[A, G, C, T])*$)")
|
||
|
|
||
|
|
||
|
for line in sys.stdin:
|
||
|
x = re.findall(pattern, line)
|
||
|
if x:
|
||
|
print('yes')
|
||
|
else:
|
||
|
print("no")
|