#include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(0); vector o = {"gray","brown","green","cyan","blue","yellow","orange","red"}; vector p = {"gray","green","blue","yellow","red"}; vector q = {"gray","green","cyan","blue","violet","orange","red"}; vector s(3); for(auto &e: s) cin >> e; sort(s.begin(), s.end()); int z = 0; do{ if(count(o.begin(), o.end(), s[0]) && count(p.begin(), p.end(), s[1]) && count(q.begin(), q.end(), s[2])) ++z; }while(next_permutation(s.begin(), s.end())); if(z == 1) cout << "Yes" << '\n'; else cout << "No" << '\n'; return 0; }