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.*;
import java.io.*;
public class CF{
	static ArrayList<Integer> list[];
	static boolean visited[];
	public static void main(String[] args) {
		Scanner  scan = new Scanner(System.in);
		long n = scan.nextLong();
		HashSet<Long> set = new HashSet<Long>(100000);
		long arr[] = new long[100001];
		for(int i =1;i<=100000;i++)
		{
			long num = (long)i;
			num*=(num+1);
			num/=2;
			arr[i] = n - num;
			set.add(num);
		}
		for(int i = 1;i<=100000;i++)
		{
			if (set.contains(arr[i]))
			{
				System.out.println("YES");
				return;
			}
		}
		System.out.println("NO");
	}


}

	class MyScanner {
	    BufferedReader br;
	    StringTokenizer st;

	    public MyScanner() {
	        br = new BufferedReader(new InputStreamReader(System.in));
	    }

	    public int mod(long x) {
	        // TODO Auto-generated method stub
	        return (int) x % 1000000007;
	    }

	    public int mod(int x) {
	        return x % 1000000007;
	    }

	    boolean hasNext() {
	        if (st.hasMoreElements())
	            return true;
	        try {
	            st = new StringTokenizer(br.readLine());
	        } catch (IOException e) {
	            e.printStackTrace();
	        }
	        return st.hasMoreTokens();
	    }

	    String next() {
	        while (st == null || !st.hasMoreElements()) {
	            try {
	                st = new StringTokenizer(br.readLine());
	            } catch (Exception e) {
	                e.printStackTrace();
	            }
	        }
	        return st.nextToken();
	    }

	    int nextInt() {
	        return Integer.parseInt(next());
	    }
	    long nextLong(){
	    	return Long.parseLong(next());
	    }
	    double nextDouble() {
	        return Double.parseDouble(next());
	    }

	    String nextLine() {
	        String str = "";
	        try {
	            str = br.readLine();
	        } catch (IOException e) {
	            e.printStackTrace();
	        }
	        return str;
	    }
}