#include using namespace std; void fast_io() { ios::sync_with_stdio(false); std::cin.tie(nullptr); } vector t1{"gray", "brown", "green", "cyan", "blue", "yellow", "orange", "red"}; vector t2{"gray", "green", "blue", "yellow", "red"}; vector t3{"gray", "green", "cyan", "blue", "violet", "orange", "red"}; int main() { fast_io(); vector s(3); cin >> s[0] >> s[1] >> s[2]; sort(s.begin(), s.end()); int cnt = 0; for (string x : t1) { for (string y : t2) { for (string z : t3) { vector t = {x, y, z}; sort(t.begin(), t.end()); cnt += (t == s); } } } cout << (cnt == 1 ? "Yes" : "No") << endl; }