#include using namespace std; #define _p(...) (void)printf(__VA_ARGS__) #define forr(x,arr) for(auto&& x:arr) #define _overload3(_1,_2,_3,name,...) name #define _rep2(i,n) _rep3(i,0,n) #define _rep3(i,a,b) for(int i=int(a);i=int(a);i--) #define rrep(...) _overload3(__VA_ARGS__,_rrep3,_rrep2,)(__VA_ARGS__) #define all(x) (x).begin(),(x).end() #define bit(n) (1LL<<(n)) #define sz(x) ((int)(x).size()) #define ten(n) ((int)1e##n) #define fst first #define snd second using ll=long long; using pii=pair;using pll=pair;using pil=pair;using pli=pair; using vs=vector;using vvs=vector;using vvvs=vector; using vb=vector;using vvb=vector;using vvvb=vector; using vi=vector;using vvi=vector;using vvvi=vector; using vl=vector;using vvl=vector;using vvvl=vector; using vd=vector;using vvd=vector;using vvvd=vector; using vpii=vector;using vvpii=vector;using vvvpii=vector; template bool amax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template bool amin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } ll ri(){ll l;cin>>l;return l;} string rs(){string s;cin>>s;return s;} templateT read(){T t;cin>>t;return t;} templateostream&operator<<(ostream&o,const pair&p){return o<<'('<ostream&operator<<(ostream&o,const vector&t){o<<"{";forr(e,t)o<void e_r_r(vs::iterator it,T a,Args... args){cerr<substr((*it)[0]==' ',it->length())<<" = "< A(n); rep(i, n) A[i] = ri(); vector R(sz(A)); rep(ii, sz(A)) R[ii] = (ii ? R[ii-1] : 0) + A[ii]; int i = 0; for (; i < n-1; i++) { int d = R[i]; int e = R[i+1]; double t1 = d / x; double t2 = e / y; if (t2 < t1) break; } bool ans = (i+1) >= n; cout << (ans ? "YES" : "NO") << endl; } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); Main(); return 0; }