s = input() if ('575' in s) == True: print('YES') else: print('NO')