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 Main {

    public static void main(String[] args) {
        Scanner t = new Scanner(System.in);
        int numero = t.nextInt();
        if (IsFunky(numero)) System.out.println("YES");
        else System.out.println("NO");
    }

    static boolean IsFunky(int n){
        if (n <= 1) return  false;
        List<Integer> Triangulares;
        Triangulares = Get_Triangulares(n);
        return BusquedaBinaria(Triangulares, n);
    }

    static boolean BusquedaBinaria(List<Integer> Lista, int dato){
        int izquierda = 0, derecha = Lista.size() - 1, mitad;
        while (izquierda <= derecha){
            //mitad = (izquierda + derecha)/2;
            //System.out.println(Lista.get(izquierda) + " + " + Lista.get(derecha) + " = " + (Lista.get(izquierda)+Lista.get(derecha)));
            if (Lista.get(izquierda) + Lista.get(derecha) == dato) return true;
            else if (Lista.get(izquierda) + Lista.get(derecha) > dato) derecha--;
            else izquierda++;
        }
        return false;
    }

    static List Get_Triangulares(int n){
        List<Integer> Lista = new ArrayList<>();
        for (int i = 1, j = 0; n > Num_Trian(i); i++, j++) Lista.add(Num_Trian(i));
        //for (int i = 0; i < Lista.size(); i++) System.out.print(Lista.get(i) + ", ");
        return Lista;
    }

    static int Num_Trian(int n){
        return (n*(n+1))/2;
    }
}