#include int main(){char a,b;std::cin>>a>>b;std::cout<<(abs(a-b)==1?"Yes":"No");}