S = input() if str(575) in S: print('YES') else: print('NO')