Problem: As you very well know, this year's funkiest numbers are so called triangular numbers (that is, integers that are representable as <image>, where k is some positive integer), and the coolest numbers are those that are representable as a sum of two triangular numbers.

A well-known hipster Andrew adores everything funky and cool but unfortunately, he isn't good at maths. Given number n, help him define whether this number can be represented by a sum of two triangular numbers (not necessarily different)!

Input

The first input line contains an integer n (1 ≤ n ≤ 109).

Output

Print "YES" (without the quotes), if n can be represented as a sum of two triangular numbers, otherwise print "NO" (without the quotes).

Examples

Input

256


Output

YES


Input

512


Output

NO

Note

In the first sample number <image>.

In the second sample number 512 can not be represented as a sum of two triangular numbers.

Solution (in PYTHON3):

Solution:
def binary_search(arr, low, high, x):
    # Check base case
    if high >= low:

        mid = (high + low) // 2

        if arr[mid] == x:
            return mid

        elif arr[mid] > x:
            return binary_search(arr, low, mid - 1, x)

        else:
            return binary_search(arr, mid + 1, high, x)

    else:
        return -1
n=int(input())
n=n*2
final = 1
check=[]
root=int(((4*(n-2) +1)**(0.5)-1)/2)
i=1
j=root
cong = root**2 + root
if n==2:
    print("NO")
    final=0
while i<=j and final==1:
    init= i*i + i
    # check.append(init)
    number = n - init
    if binary_search(check,0,len(check)-1,number)!=(-1):
    # if number in check:
        print("YES")
        final=0
        break
    else:
        while (cong + init)>= n and final==1:
            if (cong)==number :
                print('YES')
                final=0
                break
            else:
                check.append(cong)
                j-=1
                cong = j ** 2 + j

        i+=1
if final==1 :
    print("NO")