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.awt.Point;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.StringTokenizer;

public class A2 {

    public static void main(String[] Args) throws IOException {
        new A2().solve();
    }

    void solve() throws IOException {
        tok();
        long n = tokl();
        for (long a = 1; a*(a+1)/2 < n; a++) {
            long y = 2 * n - a * (a + 1);
            if (1 + 4 * y >= 0) {
                long b = (long) (-1 + Math.sqrt(1 + 4 * y)) / 2;
                if (a * (a + 1) / 2 + b * (b + 1) / 2 == n) {
                    System.out.println("YES");
                    return;
                }
                b = (long) (-1 - Math.sqrt(1 + 4 * y)) / 2;
                if (a * (a + 1) / 2 + b * (b + 1) / 2 == n) {
                    System.out.println("YES");
                    return;
                }
            }
        }
        System.out.println("NO");
    }

    // Using the Sieve of Eratosthenes
    static List<Integer> primes(int n) {
        int[] a = arePrimes(n);
        List<Integer> v = new ArrayList<Integer>();
        for (int i = 0; i < a.length; i++) {
            if (a[i] == 0)
                v.add(i);
        }
        return v;
    }

    // Sieve of Eratosthenes
    static int[] arePrimes(int n) {
        // 0=prime, 1=not prime
        int[] a = new int[n + 1];
        a[0] = a[1] = 1;
        for (int i = 0; i < a.length; i++) {
            if (a[i] == 0)
                for (int j = i + i; j < a.length; j += i) {
                    a[j] = 1;// not prime
                }
        }
        return a;
    }

    // ----------------------- Library ------------------------
    void initSystem() throws IOException {
        if (br != null)
            br.close();
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    void initFile() throws IOException {
        if (br != null)
            br.close();
        br = new BufferedReader(new InputStreamReader(new FileInputStream(
                "input.txt")));
    }

    void printWriter() {
        try {
            PrintWriter pr = new PrintWriter("output.txt");
            pr.println("hello world");
            pr.close();
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }

    void comparator() {
        Point[] v = new Point[10];
        Arrays.sort(v, new Comparator<Point>() {
            @Override
            public int compare(Point a, Point b) {
                if (a.x != b.x)
                    return -(a.x - b.x);
                return a.y - b.y;
            }
        });
    }

    double distance(Point a, Point b) {
        double dx = a.x - b.x, dy = a.y - b.y;
        return Math.sqrt(dx * dx + dy * dy);
    }

    Scanner in = new Scanner(System.in);

    String ss() {
        return in.next();
    }

    String sline() {
        return in.nextLine();
    }

    int si() {
        return in.nextInt();
    }

    int[] sai(int n) {
        int[] a = new int[n];
        for (int i = 0; i < a.length; i++) {
            a[i] = in.nextInt();
        }
        return a;
    }

    int[] sai_(int n) {
        int[] a = new int[n + 1];
        for (int i = 1; i <= n; i++) {
            a[i] = in.nextInt();
        }
        return a;
    }

    BufferedReader br;
    StringTokenizer tokenizer;
    {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    void tok() throws IOException {
        tokenizer = new StringTokenizer(br.readLine());
    }

    int toki() throws IOException {

        return Integer.parseInt(tokenizer.nextToken());
    }

    int[] rint(int n) throws IOException {
        int[] a = new int[n];
        for (int i = 0; i < a.length; i++)
            a[i] = Integer.parseInt(tokenizer.nextToken());

        return a;
    }

    int[] rint_(int n) throws IOException {
        int[] a = new int[n + 1];
        for (int i = 1; i <= n; i++)
            a[i] = Integer.parseInt(tokenizer.nextToken());

        return a;
    }

    String[] rstrlines(int n) throws IOException {
        String[] a = new String[n];
        for (int i = 0; i < n; i++) {
            a[i] = br.readLine();
        }
        return a;
    }

    long tokl() {
        return Long.parseLong(tokenizer.nextToken());
    }

    double tokd() {
        return Double.parseDouble(tokenizer.nextToken());
    }

    String toks() {
        return tokenizer.nextToken();
    }

    String rline() throws IOException {
        return br.readLine();
    }

    List<Integer> toList(int[] a) {
        List<Integer> v = new ArrayList<Integer>();
        for (int i : a)
            v.add(i);
        return v;
    }

    static void pai(int[] a) {
        System.out.println(Arrays.toString(a));
    }

    static int toi(Object s) {
        return Integer.parseInt(s.toString());
    }

    static int[] dx_ = { 0, 0, 1, -1 };
    static int[] dy_ = { 1, -1, 0, 0 };

    static int[] dx3 = { 1, -1, 0, 0, 0, 0 };
    static int[] dy3 = { 0, 0, 1, -1, 0, 0 };
    static int[] dz3 = { 0, 0, 0, 0, 1, -1 };

    static int[] dx = { 1, 0, -1, 1, -1, 1, 0, -1 }, dy = { 1, 1, 1, 0, 0, -1,
            -1, -1 };

    static int INF = 2147483647; // =2^31-1 // -8
    static long LINF = 922337203854775807L; // -8
    static short SINF = 32767; // -32768

    // finds GCD of a and b using Euclidian algorithm
    public int GCD(int a, int b) {
        if (b == 0)
            return a;
        return GCD(b, a % b);
    }

    static List<String> toList(String[] a) {
        return Arrays.asList(a);
    }

    static String[] toArray(List<String> a) {
        String[] o = new String[a.size()];
        a.toArray(o);
        return o;
    }

    static int[] pair(int... a) {
        return a;
    }
}