#include using namespace std; string ja(unordered_set s, string l, string r){ string j = "00"; for(auto & e : s){ if(e == l || e == r) continue; else j = e; } return j; } bool so(){ unordered_set a = {"gray","brown","green","cyan","blue","yellow","orange","red"}; unordered_set b = {"gray","green","blue","yellow","red"}; unordered_set c = {"gray","green","cyan","blue","violet","orange","red"}; string br ="brown", vi = "violet", z = "00"; unordered_set s; for(int i = 0; i < 3; ++i){ string x; cin >> x; s.insert(x); } if(s.size() == 1) return true; if(s.count(br)){ if(s.count("yellow")){ string j = ja(s, br, "yellow"); if(j == z) return false; else return true; }else if(s.count("cyan")){ string j = ja(s, br, "cyan"); if(j == z || j == "orange" || j == vi) return false; else return true; }else if(s.count("orange")){ string j = ja(s, br, "orange"); if(j == z || j == "cyan" || j == vi) return false; else return true; }else if(s.count(vi)){ string j = ja(s, br, vi); if(j == z || j == "cyan" || j == "orange") return false; else return true; } }else if(s.count(vi)){ if(s.count("orange")){ string j = ja(s, vi, "orange"); if(j == z || j == "cyan" || j == br) return false; else return true; }else if(s.count("cyan")){ string j = ja(s, vi, "cyan"); if(j == z || j == br || j == "orange") return false; else return true; }else if(s.count(br)){ string j = ja(s, vi, br); if(j == z || j == "cyan" || j == "orange") return false; else return true; } } return false; } int main(){ ios::sync_with_stdio(false); cin.tie(0); bool bl = so(); if(bl) cout << "Yes" << '\n'; else cout << "No" << '\n'; return 0; }