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.util.*;
import java.io.*;
public class A192 
{
	static int binarySearch(ArrayList<Long> arr, int l, int r, long x) {
		if (r >= l) {

			int mid = l + (r - l) / 2;

			// If the element is present at the 
			// middle itself 
			if (mid > arr.size() - 1) {
				return -1;
			}
			if (arr.get(mid) == x)
				return mid;

			// If element is smaller than mid, then 
			// it can only be present in left subarray 
			if (arr.get(mid) > x)
				return binarySearch(arr, l, mid - 1, x);

			// Else the element can only be present 
			// in right subarray 
			return binarySearch(arr, mid + 1, r, x);
		}

		// We reach here when element is not present 
		// in array 
		return -1;
	}
	public static void process()throws IOException
	{
	 long n=L();
	 if(n==1)
	 {
		 pn("NO");
	 }
	 else
	 {
	ArrayList<Long> arr=new ArrayList<Long>();

	for(int i=0;i<100004;i++)
	{
		arr.add((long) (((long)(i+1)*((long)(i+1)+1))/2));
	}
  
	boolean flag=false;
	for(int i=100003;i>=0;i--)
	{

		if(binarySearch(arr,0,100003,n-arr.get(i))!=-1)
		{
			//pn(arr.get(i)+" "+(n-arr.get(i)));
			flag=true;break;
		}
	}
	
	
	
	
	
	
	
	
	
	if(flag)
	{
		pn("YES");
	}
	else
	{
		pn("NO");
	}
	
	 
	 
	 
	 
	}
	}
	
	
	
	
	
	
	
	
	
	
	static Scanner sc = new Scanner(System.in);
	static PrintWriter out = new PrintWriter(System.out);
	static void pn(Object o){out.println(o);out.flush();}
	static void p(Object o){out.print(o);out.flush();}
	static void pni(Object o){out.println(o);System.out.flush();}
	static int I() throws IOException{return sc.nextInt();}
	static long L() throws IOException{return sc.nextLong();}
	static double D() throws IOException{return sc.nextDouble();}
	static String S() throws IOException{return sc.next();}
	static char C() throws IOException{return sc.next().charAt(0);}
	static int[] Ai(int n) throws IOException{int[] arr = new int[n];for (int i = 0; i < n; i++)arr[i] = I();return arr;}
	static String[] As(int n) throws IOException{String s[] = new String[n];for (int i = 0; i < n; i++)s[i] = S();return s;}
	static long[] Al(int n) throws IOException {long[] arr = new long[n];for (int i = 0; i < n; i++)arr[i] = L();return arr;}
	static void dyn(int dp[][],int n,int m,int z)throws IOException {for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ dp[i][j]=z;}} }
	
//	*--------------------------------------------------------------------------------------------------------------------------------*//
	static class AnotherReader {BufferedReader br;StringTokenizer st;AnotherReader() throws FileNotFoundException {br = new BufferedReader(new InputStreamReader(System.in));}
	AnotherReader(int a) throws FileNotFoundException {br = new BufferedReader(new FileReader("input.txt"));}
	String next() throws IOException{while (st == null || !st.hasMoreElements()) {try {st = new StringTokenizer(br.readLine());} catch (IOException e) {e.printStackTrace();}}return st.nextToken();}
	int nextInt() throws IOException {return Integer.parseInt(next());}
	long nextLong() throws IOException {return Long.parseLong(next());}
	double nextDouble() throws IOException {return Double.parseDouble(next());}
	String nextLine() throws IOException {String str = "";try {str = br.readLine();} catch (IOException e) {e.printStackTrace();}return str;}}
	public static void main(String[] args)throws IOException{try{boolean oj=true;if(oj==true)
	{AnotherReader sk=new AnotherReader();PrintWriter out=new PrintWriter(System.out);}
	else
	{AnotherReader sk=new AnotherReader(100);out=new PrintWriter("output.txt");}
	//-long T=L();while(T-->0)
	{process();}out.flush();out.close();}catch(Exception e){return;}}}
//*-----------------------------------------------------------------------------------------------------------------------------------*//