s=input() a,b=s[::2],s[1::2] print(a,b,sep='\n') if a.islower() and ' ' not in a and set(b)=={' '}: print('Yes') else: print('No')