Masala #6A8DJJ9GJL
Shaxmat donalari
Sizga 2 ta shaxmat donasi beriladi(Shox,Farzin,Ot,Rux,Fil) va keyingi qatorda ularning koordinatasi beriladi.Siz shaxmat donalarini bir birini ura olmasligini tekshirishingiz kerak.
Kirish faylida 1-qatorda 2 ta shaxmat donasi nomi bo'shliq bilan ajratilgan holda beriladi 2-qatorda 1-shaxmat donasining koordinatasi 3-qatorda 2-shaxmat donasining koordinatasi kiritiladi
Chiqish faylida agar shaxmat donalari bir-birini ura olmasa "Yes" so'zini chop eting agarda kiritishda xatolik bo'lsa “Error” so'zini chop eting agarda shaxmat donalari bir-birini ura olsa "No" so'zini chop eting
# | input.txt | output.txt |
---|---|---|
1 |
Shox Shox A1 B1 |
No |
2 |
Farzin Fil A1 C4 |
Yes |
3 |
Shox Fil A1 A1 |
Error |