Masala #NSSXPEYLIV
Chess#2
Sizga shaxmat donalaridan bittasi(Rux,Shox,Piyoda,Ot,Fil,Farzin) va uning turgan kordinatasi va yurgandan keyingi kordinatasi beriladi .Siz u turgan joyidan keyingi yurgan joyiga o'tishi mumkin yoki yo'qligini aniqlang.
Kirish faylida shaxmat toshilarning biri(Rux,Shox,Piyoda,Ot,Fil,Farzin) va a va b turgan kordinatalari(a,b≤8) va c va d yurgandan keyingi kordinatasi(c,d≤8) beriladi.
Masalani javobini chop eting.Agar shaxmat toshlari noto'g'ri yozilgan bo'lsa Error ni chop eting.
# | input.txt | output.txt |
---|---|---|
1 |
Shox b 2 b 4 |
NO |
2 |
Rux b 3 b 4 |
YES |
3 |
shox b 3 b 4 |
Error |
4 |
Farzin b 3 e 6 |
YES |
5 |
Piyoda b 2 b 4 |
YES |