def I(): a=0 l=list(map(int,input().split('.'))) for i in range(3): a+=l[i]*1000**(2-i) return a print("YNEOS"[I()