a=int(input())
b=int(input())
c=int(input())
d=int(input())
if a>0 and a<=8 and c>0 and c<=8 and b>0 and b<=8 and d>0 and d<=8:
print("NO")
YT1pbnQoaW5wdXQoKSkKYj1pbnQoaW5wdXQoKSkKYz1pbnQoaW5wdXQoKSkKZD1pbnQoaW5wdXQoKSkKaWYgYT4wIGFuZCBhPD04IGFuZCBjPjAgYW5kIGM8PTggYW5kIGI+MCBhbmQgYjw9OCBhbmQgZD4wIGFuZCBkPD04OgoJcHJpbnQoIk5PIik=