#include //#include using namespace std; typedef long long ll; using Graph = vector>; const int INF = 1<<30; const ll INFLL = 1LL<<60; const int MOD = 998244353; //1000000007; int main() { int n; cin >> n; vector a(n); for (int i = 0 ; i < n; i++) cin >> a[i]; sort(a.begin(), a.end()); ll a_sum = reduce(a.begin(), a.end()); bool ok = true; if (a_sum > 0 && reduce(a.begin(), a.end() - 1) > 0) ok = false; if (a_sum < 0 && reduce(a.begin() + 1, a.end()) < 0) ok = false; cout << (ok ? "Yes" : "No") << endl; return 0; }