Dhinchak's Fee

0

0 votes
Medium
Problem

Dhinchak Pooja wants to fix a price for her great concert. She loves natural numbers and wants to fix price equal a number N such that N can be split into two numbers such that both numbers are of the form z*(z+1)/2 where z is a natural number.

For a given N your task is to tell her whether it can be split in required form or not.


Input

Input contains a single line having an integer N


Output

Prin "YES" or "NO" for given N as described in question


Constraints

For 30 points

0 <N <=10^5

For 70 points

0 <N <=10^9

Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

119 can be written as 7(7+1)/2 + 13(13+1)/2

Editor Image

?