I=lambda:list(map(int,input().split('.'))) print("YNEOS"[I()