#include using namespace std; using ll = long long; int main() { int n; cin >> n; vector a(n); ll s = 0; for (int i = 0; i < n; i++) { cin >> a[i]; s += a[i]; } sort(a.begin(), a.end()); if (s >= 0 and s - a.back() <= 0) cout << "Yes" << endl; else if (s <= 0 and s - a.front() >= 0) cout << "Yes" << endl; else cout << "No" << endl; }