Masala #MTL7UYLVS3
Chess
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 |
Piyoda 2 2 2 4 |
YES |
2 |
Shox 2 3 2 5 |
NO |
3 |
Rux 2 3 2 4 |
YES |
4 |
shox 2 2 2 3 |
Error |
5 |
Farzin 2 3 5 6 |
YES |