J. Jigsaw of Perfect Squares
time limit per test
2 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output
Examples
Input
3
2 3 6
Output
YES
Input
6
4 4 4 4 4 4
Output
NO