Untitled

 avatar
user_2071194455
plain_text
2 years ago
323 B
1
Indexable
Never
def check(a):
    for i in range(7):
        for j in range(i+1, 8):
            if a[i][1] == a[j][1] or a[i][0] == a[j][0] or abs(a[i][1]-a[j][1]) == abs(a[i][0] - a[j][0]):
                return 'YES'
    return 'NO'


a = []
for i in range(8):
    a.append([int(x) for x in input().split()])
print(check(a))