Python

Заданы две клетки шахматной доски. Если они покрашены в один цвет, то выведите слово YES, если в разный то NO

Входные данные
Вводятся 4 числа - координаты клеток.
Выходные данные
Выведите ответ на задачу.
if odd(x1 + y1) = odd(x2 + y2) then writeln('Yes') else writeln('No')
Валерий Шинкарев
Валерий Шинкарев
56 420
Лучший ответ
задача ясна ) что там с решением?
Алексей _
Алексей _
20 058
a = int(input())
b = int(input())
c = int(input())
d = int(input())

if (a + b) % 2 == 0 and (c + d) % 2 == 0:
print('YES')
elif (a + b) % 2 == 1 and (c + d) % 2 == 1:
print('YES')
elif (a + b) % 2 == 1 and (c + d) % 2 == 0:
print('NO')
elif (a + b) % 2 == 0 and (c + d) % 2 == 1:
print('NO')
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = a + b
f = c + d
if e % 2 == 0 and f % 2 == 0:
print ('YES')
elif e % 2 != 0 and f % 2 != 0:
print ('YES')
else:
print ('NO')
x1 = int(input())
y1 = int(input())
x2 = int(input())
y2 = int(input())
if ((x1 + y1) + (x2 + y2)) % 2 == 0:
print('YES')
else:
print('NO')
a = int(input())
b = int(input())
c = int(input())
d = int(input())

if (a+b)% 2 ==0 and (c+d)%2 ==0 or (a+b)% 2 !=0 and (c+d)%2 !=0:
print('Yes')
else:
print('No')