#include<iostream>
#include<cstring>
using namespace std;
int main(){
string s;
cin>>s;
int len=s.length();
if(!len)cout<<"Yes";
else{
int pt=1;
while(pt<len){
if(pt+1==len||s[pt]=='#'&&s[pt+1]!='#'||s[pt]!='#'&&s[pt+1]=='#')break;
pt+=2;
}
if(pt<len)cout<<"No";
else cout<<"Yes";
}
return 0;
}