num = int(input()) if (400|num) == 400 or (500|num) == 500: print("Yes") else: print("No")