print(" YNEOS"["575"in input()::2])