题解 | #矩阵乘法计算量估算#
合法IP
http://www.nowcoder.com/practice/995b8a548827494699dc38c3e2a54ee9
s=input().split('.')
if len(s)==4:#长度确认
for i in s:
if i.isdigit():#数字确认
if str(int(i))==i:#筛选01这样的数字
if int(i) not in range(256):#筛选超范围数字
print('NO')
break
else:
print('NO')
break
else:
print('NO')
break
else:
print('YES')
else:
print('NO')