LearnPy Hub
← Arena
IntermediateRating 1300

Two Squares

Print YES if n can be written as a² + b² with integers a, b ≥ 0, otherwise NO.

Input

One integer n (0 ≤ n ≤ 10¹²).

Output

YES or NO.

Sample 1

Input
5
Output
YES

Sample 2

Input
3
Output
NO
solution.py
Output appears here
Two Squares · Python Arena problem · LearnPy Hub