# input S_str = input() # judge judge = S_str.find('575') if judge == -1: print('NO') else: print('YES')