#include //cin, cout #include //vector #include //sort,min,max,count #include //string,getline, to_string #include //abs(int) #include //swap, pair #include //deque #include //INT_MAX #include //bitset using namespace std; int main() { string a,b,c; cin >> a >> b >> c; bool flg = true; if (a[0] == a[1] || a[1] == a[2]) { flg = false; } if (b[0] == b[1] || b[1] == b[2]) { flg = false; } if (c[0] == c[1] || c[1] == c[2]) { flg = false; } if (a[0] == b[0] || b[0] == c[0]) { flg = false; } if (a[1] == b[1] || b[1] == c[1]) { flg = false; } if (a[2] == b[2] || b[2] == c[2]) { flg = false; } if (flg) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }