S = input() find = S.find('575') if find != -1: print('YES') else: print('NO')