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.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.Iterator;


public class Main {

    /** GENERAL CONFIGURATION **/
    public static final int TIME_LIMIT = 2;
    public static final long MEMORY_LIMIT = 64 * 1024 * 1000;
    public static final int INPUT_OUTPUT = InputOutputMode.CONSOLE; 
    
    /** EXTENDS CONFIGURATION **/
    public static final String INPUT_FILE_NAME = "input.txt";
    public static final String OUTPUT_FILE_NAME = "output.txt";
    
    /** INITIALIZATION  IO **/
    public static final InputReader in = Prepare.input();
    public static final OutputWriter out = Prepare.output();
    
    
    public static void main(String[] args) throws IOException {
        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    }
}

class Task {
    ArrayList[]start = new ArrayList[26];
    char begin;
    char finish;
    int MAX = 0;
    
    public void solve(int testNumber, InputReader in, OutputWriter out) {
          int n = in.readInt();
            HashSet<Long>set = new HashSet<Long>();
            for (long i = 2;; i++) {
                long x = (long)(i * i);
                if (x > 8000000001L) break;
                else {
                    set.add(x);
                }
            }
            
            Iterator<Long>it = set.iterator();
            while (it.hasNext()) {
                long t = it.next();
                long x = (t - 1) / 8;
                if (x * 8 + 1 != t) continue;
                long b = 8 * (n - x) + 1;
                if (set.contains(b) && n - x > 0 && x > 0) {
                    out.printLine("YES");
                    return;
                }
            }
            out.printLine("NO");
        
    }
    
    public int start(int id, int s, int e, int len) {
        if ('a' + e == begin) MAX = Math.max(MAX, len);
        for (int j = 0; j < start[e].size(); j++) {
            King k = (King)start[e].get(j);
            if (k.id > id) {
                start(k.id, k.start - 'a', k.end - 'a', len + k.len);   
            }
        }
        return len;
    }
    
    class King {
        int id;
        char start;
        char end;
        int len;
        public King(int id, char s, char e, int len) {
            this.id = id;
            start = s;
            end = e;
            this.len = len;
        }
    }
}

class InputReader {

    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int readInt() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public long readLong() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        long res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public String readString() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuffer res = new StringBuffer();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }

    public char readCharacter() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        return (char) c;
    }

    public static boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }
}

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(outputStream);
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object... objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void printLine(Object... objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }
}

class InputOutputMode {
    public static final int CONSOLE = 0;
    public static final int FILE = 1;
}

class Prepare {
    public static InputStream input;
    public static OutputStream output;
    
    @SuppressWarnings("unused")
    public static InputReader input() {
        try {
            if (Main.INPUT_OUTPUT == InputOutputMode.CONSOLE) {
                input = System.in;
            }
            else if (Main.INPUT_OUTPUT == InputOutputMode.FILE){
                input = new FileInputStream(new File(Main.INPUT_FILE_NAME));
            }
        }
        catch (IOException ex)
        {
            System.err.println("Some problem with input settings.");
            System.exit(0);
        }
        return new InputReader(input);
    }
    @SuppressWarnings("unused")
    public static OutputWriter output() {
        try {
            if (Main.INPUT_OUTPUT == InputOutputMode.CONSOLE) {
                output = System.out;
            }
            else if (Main.INPUT_OUTPUT == InputOutputMode.FILE){
                output = new FileOutputStream(new File(Main.OUTPUT_FILE_NAME));
            }
        }
        catch (IOException ex) {
            System.err.println("Some problem with output settings.");
            System.exit(0);
        }
        return new OutputWriter(output);
    }
}