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 JAVA):

Solution:
import java.io.BufferedInputStream;
import java.util.Scanner;

/**
 * Created by jizhe on 2015/12/19.
 */
public class FunkyNumbers {
    private static void run1()
    {
        Scanner in = new Scanner(new BufferedInputStream(System.in));

        int n = in.nextInt();

        int i, funky = 0;
        for( i = 1; funky <= n/2+1; i++ )
        {
            funky = i*(i+1)/2;
            int second = n-funky;
            int root = (int)Math.pow(second*2, 0.5);
            if( root != 0 && root*(root+1) == second*2 )
            {
                System.out.printf("YES\n");
                System.out.printf("%d*%d/2 + %d*%d/2\n", i, i+1, root, root+1);
                return;
            }
        }
        //System.out.printf("%d, %d\n", i, funky);
        System.out.printf("NO\n");
    }

    private static int bs(int[] numbers, int count, int target)
    {
        int lo = 0, hi = count-1;
        while( lo <= hi )
        {
            int mid = lo + (hi-lo)/2;
            if( numbers[mid] < target )
            {
                lo = mid+1;
            }
            else if( numbers[mid] > target )
            {
                hi = mid-1;
            }
            else
            {
                return mid;
            }
        }
        return -1;
    }

    private static void run2()
    {
        Scanner in = new Scanner(new BufferedInputStream(System.in));

        int n = in.nextInt();
        int[] numbers = new int[44721];

        int count, funky = 0;
        for( count = 1; ; count++ )
        {
            funky = count*(count+1)/2;
            if( funky > n )
            {
                break;
            }
            numbers[count-1] = funky;
            //System.out.printf("%d\n", funky);
        }
        //System.out.printf("%d\n", count);
        int second = n;
        for( int i = 0; second > n/2; i++ )
        {
            second = n-numbers[i];
            //System.out.printf("bs find second: %d\n", second);
            //int ret = bs(numbers, count, second);
            if( bs(numbers, count, second) != -1 )
            {
                System.out.printf("YES\n");
                //System.out.printf("%d*%d/2 + %d*%d/2\n", i+1, i+2, ret+1, ret+2);
                return;
            }
        }
        System.out.printf("NO\n");
    }

    public static void main(String[] args) {
        //run1();
        run2();
    }
}