0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-30 19:56:28 +00:00
OI-codes/AtCoder/ABC244/D/D.cpp

20 lines
368 B
C++

#include <iostream>
using std::cin;
using std::cout;
const char endl = '\n';
int cnt;
char s1, s2, s3,
t1, t2, t3;
int main() {
std::ios::sync_with_stdio(false);
cin >> s1 >> s2 >> s3 >> t1 >> t2 >> t3;
if (s1 != t1) cnt++;
if (s2 != t2) cnt++;
if (s3 != t3) cnt++;
cout << (cnt == 0 || cnt == 3 ? "Yes" : "No") << endl;
return 0;
}