#include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const int inf = 0x3f3f3f3f; const int maxn = 10010; int a[maxn]; int main() { int n; while (cin >> n) { for (int i = 0; i < n; ++i) scanf("%d", &a[i]); sort(a, a+n); int flag = 0; for (int i = 0; i < n; ++i) for (int j = i+1; j < n; ++j) for (int k = j+1; k < n; ++k) if (a[i] + a[j] == a[k]) { flag = 1; break; } printf("%s\n", flag?"YES":"NO"); } return 0; }