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:
# python 3
"""
k(k+1)/2 + j(j+1)/2 = n means k^2 + k + j^2 + j = 2n, 4k^2 + 4k + 4j^2 + 4j = 8n,
(2k+1)^2 + (2j+1)^2 = 8n+2. So 8n+2 must be the sum of squares of two odd numbers.
"""
from math import sqrt


def binary_search(s, e, target):
    if s > e:
        return False

    mid = s + (e - s) // 2
    mid_squared = pow(mid, 2)
    if mid_squared == target:
        return True
    elif mid_squared > target:
        return binary_search(s, mid-1, target)
    else:
        return binary_search(mid+1, e, target)


def funky_numbers(n_int) -> str:
    odd_1 = 3  # minimum is 3
    odd_1_squared = pow(odd_1, 2)
    while odd_1_squared <= n_int:
        a_squared = n_int - odd_1_squared
        start = 3
        end = int(sqrt(a_squared)+1)
        if binary_search(start, end, a_squared):
            return "YES"
        else:
            odd_1 += 2
            odd_1_squared = pow(odd_1, 2)
    return "NO"


if __name__ == "__main__":
    """
    Inside of this is the test. 
    Outside is the API
    """
    n = int(input())

    print(funky_numbers(8*n+2))