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:
     // package main;
import java.util.*;
import java.io.*;
import java.math.*;

public class Main {
    static StringTokenizer st;
    static BufferedReader scan;
    static PrintWriter out;
    public static void main(String[] args) throws IOException {
        //Scanner sscan = new Scanner(new File("C:\\Users\\Togrul\\Desktop\\Main\\src\\main\\input.txt"));
        //PrintStream oout = new PrintStream(new File("C:\\Users\\Togrul\\Desktop\\Main\\src\\main\\output.txt"));
        scan = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        ///////////////////////
        int n = nextInt();
        boolean ok = false;
        for(int i = 1; (i * (i + 1)) / 2 <= n; i++){
             int k = n - (i * (i + 1)) / 2;
             int x = 1, t = 1;
             while(x < k){
                 t++;
                 x += t;
             }
             if(x == k){
                 ok = true;
                 
                 break;
             }
        }
        if(ok)
        out.println("YES");
        else out.println("NO");
        ////////////////////////
        scan.close(); out.close();
        //sscan.close(); oout.close();
    }
    private static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }
    private static long nexLong() throws IOException {
        return Long.parseLong(next());
    }
    private static BigInteger nextBigInteger() throws IOException {
        return new BigInteger(next());
    }
    private static BigDecimal nextBigDecimal() throws IOException {
        return new BigDecimal(next());
    }
    private static double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }
    private static String next() throws IOException {
        while(st == null || ! st.hasMoreTokens()){
            st = new StringTokenizer(scan.readLine());
        }
        return st.nextToken();
    }
}