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.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.io.InputStream;


public class A121 {
        public static void main(String[] args) {
                InputStream inputStream = System.in;
                OutputStream outputStream = System.out;
                InputReader in = new InputReader(inputStream);
                PrintWriter out = new PrintWriter(outputStream);
                CodeA121 solver = new CodeA121();
                solver.solve(1, in, out);
                out.close();
        }
}

class CodeA121
{
	public void solve(int testNumber, InputReader in, PrintWriter out)
	{
		long n=in.nextLong();
		long arr[]=new long[100000];
		for(int i=0;i<arr.length;i++)
		{
			arr[i]=((long)(i+1)*(long)(i+2))/2;
		}
		//out.println(arr[arr.length-1]);
		int ind1=arr.length-1;
		int ind2=0;
		long sum=0;
		int f=0;
		do
		{
			sum=arr[ind1]+arr[ind2];
			//out.println(arr[ind1]+" "+arr[ind2]+" "+sum+" "+n);
			if(sum>n)
			{
				ind1--;
			}
			else if(sum<n)
			{
				ind2++;
			}
			else
			{
				f=1;
			}
		}while((ind1>=ind2)&&(sum!=n));
		if(f==1)
		{
			out.println("YES");
		}
		else
		{
			out.println("NO");
		}
	}

}






class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public long nextLong() {
        return Long.parseLong(next());
    }
	public void inputShuffleArrayInt(int arr[])
	{
		int l=arr.length;
		for(int i=0;i<l;i++)
		{
			if(i%2==0)
			{
				arr[i/2]=nextInt();
			}
			else
			{
				arr[l-((i+1)/2)]=nextInt();
			}
		}
	}

    }