No, you can not. A bool takes the values true or false. The literal "Yes" is a string, stored in std::string or a const char * or char * for a more C-like type.
That being said, your code compiles, because any number can be automatically cast to a boolean type. The string literal "Yes" is really just a memory address, where this string is found. And a memory address is a number. If it is zero (null), it is false, if it is non-zero, the boolean value of it is true.
That's why your code compiles and runs, but y does not actually hold the string literal "Yes".