题解 | #合法IP#
合法IP
http://www.nowcoder.com/practice/995b8a548827494699dc38c3e2a54ee9
while True:
try:
x=input().split('.')
flag=0
for i in range(len(x)):
if int(x[i])<0 or int(x[i])>255:
print('NO')
break
else:
flag+=1
if flag==len(x):
print('YES')
except:
break