N = int(input()) MAX = pow(10,5) for i in range(3,MAX): nokori = N - i*(i-1)//2 if nokori%i == 0: print("Yes");exit() print("No")