#include #include #include using namespace std; using namespace atcoder; using mint = modint998244353; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf32 1000000005 #define Inf64 4000000000000000001LL int main(){ vector> s = { {"gray","brown","green","cyan","blue","yellow","orange","red"}, {"gray","green","blue","yellow","red"}, {"gray","green","cyan","blue","violet","orange","red"} }; vector ans(3); rep(i,3)cin>>ans[i]; sort(ans.begin(),ans.end()); int aa = 0; do{ bool f = true; rep(i,3){ if(find(s[i].begin(),s[i].end(),ans[i])!=s[i].end())continue; f = false; } if(f)aa++; } while(next_permutation(ans.begin(),ans.end())); cout<<(aa==1?"Yes":"No")<