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.*;

public class cf120 {

    public static void main(String[] args) 
    {
        Scanner s=new Scanner(System.in);
 int n=ini(s),step=2,trian[]=new int[100000];
 int yn=0;
 int tmp=1;
 trian[0]=1;
 int i=1;
 while(tmp<n)
 {
  trian[i]=trian[i-1]+step;
  tmp=trian[i];
  step++;
  i++;
 }
 int len=i;
 for(i=0;i<len;i++)
 {
  tmp=n-trian[i];
  for(int j=len-1;j>=i;j--) if(tmp==trian[j]){yn=1;break;}
  if(yn==1) break;
 }
 if(yn==1) out("YES");
 else out("NO");
        //long n=inl(s);
        //long temp=n,fl=0;
        //double x1,x2;
        /*for(int i=0;i<n/2+1;i++)
        {
            temp-=i*i+i;
            x1=(-1.0+Math.sqrt(1.0+8*temp))/2;
            x2=(-1.0-Math.sqrt(1.0+8*temp))/2;
            outl(x1+" "+x2);
            if((Math.round(x1)==x1 && x1>0)|| (Math.round(x2)==x2 && x2>0)) {fl=1;break;}
        }
        if(fl==1)out("YES");
        else out("NO");
        */
       /* int n=ini(s),a[]=new int[n],res=0;
        for(int i=n-1;i>=0;i--) a[i]=ini(s);
        for()*/
        
    }
    public static String ins(Scanner s)
    {
        String str=s.next();
        return str;
    }
    
    public static int ini(Scanner s)
    {
        int n=s.nextInt();
        return n;
    }
    
    public static long inl(Scanner s)
    {
        long n=s.nextLong();
        return n;
    }
    
     public static double ind(Scanner s)
    {
        double n=s.nextDouble();
        return n;
    }
    
    public static void out(Object a)
    {
        System.out.print(a+" ");
    }
    public static void outl(Object a)
    {
        System.out.println(a);
    }
}