/* Solution Author: Pavel Glushen Date: 29.04.2018 */ #include #include #include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; unordered_map count; for (int i = 0; i < n; i++) { int t; cin >> t; count[t]++; } for (auto p : count) { if (p.first > 0 && p.second == p.first * p.first) { cout << "YES"; return 0; } } cout << "NO"; }