#include using namespace std; #define rep(i, a, b) for (int i = a; i < b; i++) using ll = long long; int main(){ vector s(3); rep(i, 0, 3) cin >> s[i]; vector> v{ {"gray","brown","green","cyan","blue","yellow","orange","red"}, {"gray","green","blue","yellow","red"}, {"gray","green","cyan","blue","violet","orange","red"}, }; sort(s.begin(), s.end()); int a = 0; do { vector c(3); rep(i, 0, 3) { for(auto e : v[i]) { if(s[i] == e) c[i]++; } } if(c[0] == 1 && c[1] == 1 && c[2] == 1) a++; } while(next_permutation(s.begin(), s.end())); string ans = "No"; if(a == 1) ans = "Yes"; cout << ans << endl; }