s = input().strip() print("YES" if '575' in s else "NO")