Problem:
 Score : 200 points    Problem Statement Determine if an N -sided polygon (not necessarily convex) with sides of length L_1, L_2, ..., L_N can be drawn in a two-dimensional plane.  You can use the following theorem:  Theorem : an N -sided polygon satisfying the condition can be drawn if and only if the longest side is strictly shorter than the sum of the lengths of the other N-1 sides.      Constraints  All values in input are integers.  3 \leq N \leq 10  1 \leq L_i \leq 100         Input Input is given from Standard Input in the following format:  N  L_1  L_2  ...  L_N       Output If an N -sided polygon satisfying the condition can be drawn, print Yes ; otherwise, print No .        Sample Input 1 4
3 8 5 1      Sample Output 1 Yes  Since 8 < 9 = 3 + 5 + 1 , it follows from the theorem that such a polygon can be drawn on a plane.       Sample Input 2 4
3 8 4 1      Sample Output 2 No  Since 8 \geq 8 = 3 + 4 + 1 , it follows from the theorem that such a polygon cannot be drawn on a plane.       Sample Input 3 10
1 8 10 5 8 12 34 100 11 3      Sample Output 3 No

Solution (Python):
n = int(input())
l = list(map(int,input().split()))
l.sort(reverse=True)
if l[0] < sum(l[1:]):
    print('Yes')
else:
    print('No')

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
L=sorted(l)
print("Yes" if max(L)<sum(L[:-1]) else "No")

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
if sum(l)-max(l)>max(l):
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
L = [int(l) for l in input().split()]
l_mx = max(L)
L.remove(l_mx)
if sum(L) <= l_mx:
  print("No")
else:
  print("Yes")

Solution (Python):
n = int(input())
l = list(map(int, input().split()))

longest = max(l)
calc = sum(l) - longest

if calc > longest:
    print('Yes')
else:
    print('No')

Solution (Python):
a = int(input())
l = list(map(int,input().split()))
max = max(l)
sum = sum(l)
if max < (sum -max) :
  print("Yes")
else :
  print("No")

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
maxl=l.pop(l.index(max(l)))
other=0
for i in l:
    other=other+i
if maxl>=other:
  print("No")
else:
  print("Yes")

Solution (Python):
import numpy as np

N = int(input())
L = list(map(int, input().split()))

i = np.argmax(L)

if L[i] < sum(L) - L[i]:
    print("Yes")
else:
    print("No")

Solution (Python):
x = int(input())
y = input()
y2 = y.split(" ")
max = 0
sum = 0
for i in range(x):
    if(max < int(y2[i])):
        max = int(y2[i])
    sum += int(y2[i])

if(max < sum-max):
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
my_list = list(map(int, input().split()))
my_list.sort()

max = my_list.pop()
print("Yes" if max < sum(my_list) else "No")

Solution (Python):
Q = int(input())
N = list(map(int, input().split()))
max_N = max(N)

if max_N < sum(N)-max_N :
  print("Yes")
else:
  print("No")

Solution (Python):
N = int(input())
l_list = list(map(int, input().split()))

l_list

goukei = sum(l_list)
max_l = max(l_list)

if max_l < goukei - max_l:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
l = max(L)
L.remove(l)
result = 0
sum = 0

for i in L:
    sum += i
if l < sum:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
L = [int(c) for c in input().split()]

longest = max(L)
others = sum(L) - longest
if longest < others:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
maxNum = l.pop(l.index(max(l)))
total = 0
for i in l:
    total += i
if maxNum < total:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
l = [int(i) for i in input().split()]
ans = 'No'
if max(l) < sum(l)-max(l):
    ans = 'Yes'
print(ans)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
M = max(a)
a.remove(M)

if M < sum(a):
  print('Yes')
else:
  print('No')

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
if max(L) * 2 - sum(L) < 0:
  print("Yes")
else:
  print("No")

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  

def solve(N: int, L: "List[int]"):
    S = sum(L)
    M = max(L)

    if M < (S-M):
        print(YES)
    else:
        print(NO)



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    L = [ int(next(tokens)) for _ in range(N) ]  
    solve(N, L)

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
l = map(int, input().split())
l = list(l)
m = max(l)
l.remove(m)
if m < sum(l):
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
for i in range(n):
  if sum(a) <= 2*a[i]:
    print("No")
    break
  if i ==n-1:
    print("Yes")

Solution (Python):
n = int(input())
l = list(map(int, input().split()))

if max(l) < (sum(l) - max(l)):
    print("Yes")
else :
    print("No")

Solution (Python):
import sys


def input():
    return sys.stdin.readline()[:-1]









n = int(input())
l = list(map(int, input().split()))
if max(l) < sum(l)-max(l):
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
L = list(map(int, input().split()))
if 2*max(L) < sum(L):
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
l = [int(i) for i in input().split()]

l.sort(reverse=True)

if (l[0] < sum(l[1:])):
    print('Yes')
else:
    print('No')

Solution (Python):
n = int(input())
L = list(map(int, input().split()))

s = sum(L)
print("Yes" if all(s-li > li for li in L) else "No")

Solution (Python):
N = int(input())
L = [int(n) for n in input().split()]

def main():
    l = sorted(L)
    print('Yes' if sum(l[:-1]) > l[-1] else 'No')

if __name__ == '__main__':
    main()

Solution (Python):
from __future__ import print_function
import numpy as np
import sys
import math,string,itertools,fractions,heapq,collections,re,array,bisect,copy,functools


import random

def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)

n = int(input())
l = np.array(list(map(int, input().split())))



if 2*l.max()<l.sum():
    print("Yes")
else:
    print("No")

Solution (Python):
import sys
input = sys.stdin.readline

n = input()
arr = sorted(map(int, input().split()))

print("Yes" if arr[-1] < sum(arr[:-1]) else "No")

Solution (Python):
input()
l = [int(i) for i in input().split()]
print('Yes' if sum(l) - 2 * max(l) > 0 else 'No')

Solution (Python):
N = int(input())
L = list(map(int,input().split()))
Lmax = max(L)
if Lmax < sum(L) - Lmax:
    print('Yes')
else:
    print('No')

Solution (Python):

"""
B - Polygon
https://atcoder.jp/contests/abc117/tasks/abc117_b

"""
import sys


def solve(L):
    rest, longest = L[:-1], L[-1]
    return ['No', 'Yes'][sum(rest) > longest]


def main(args):
    _ = int(input())
    L = map(int, input().split())
    ans = solve(sorted(L))
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
d = max(l)
j = sum(l) - 2*d
if j > 0:
  print('Yes')
else:
  print('No')

Solution (Python):
from collections import defaultdict
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpl_str(): return list(input().split())

N = int(input())
LL = inpl()
if max(LL)*2 >= sum(LL):
    print('No')
else:
    print('Yes')

Solution (Python):
if __name__ == '__main__':
    N = int(input())

    L_list = list(map(int, input().split()))

    max_L = max(L_list)

    sum_L = 0
    for L in L_list:
        sum_L += L

    if max_L < sum_L - max_L:
        print('Yes')
    else:
        print('No')

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
a.sort()
if sum(a)-2*a[n-1]>0:
    print('Yes')
else:
    print('No')

Solution (Python):
import sys
input = sys.stdin.readline

N = int(input())
L = [int(v) for v in input().split()]

ma = max(L)
s = sum(L) - ma

if s > ma:
    print("Yes")
else:
    print("No")

Solution (Python):
n = input()
l = sorted(list(map(int, input().split())))
max_l = l[-1]
if sum(l[:-1]) > l[-1]:
  print("Yes")
else:
  print("No")

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
su=sum(l)
ma=max(l)
print('Yes' if su-ma>ma else 'No')

Solution (Python):
a = int(input())
b = list(map(int,input().split()))
c = max(b)
b.remove(max(b))
print("Yes" if c < sum(b) else "No")

Solution (Python):
n = int(input())
ls = list(map(int, input().split(" ")))
print("Yes" if 2*max(ls) < sum(ls) else "No")

Solution (Python):
from sys import stdin


def main():
    _ = int(stdin.readline().rstrip())
    Ls = [int(x) for x in stdin.readline().rstrip().split()]
    max_ = max(Ls)
    Ls.remove(max_)
    print('Yes' if max_ < sum(Ls) else 'No')


if __name__ == "__main__":
    main()

Solution (Python):

n = int(input())
length = list(map(int, input().split()))
max_len = max(length)
length.remove(max_len)
if max_len < sum(length):
    print("Yes")
else:
    print("No")

Solution (Python):
input()
l = sorted(list(map(int,input().split())))
print("Yes"if l[-1]<sum(l[0:-1]) else "No")

Solution (Python):
N=int(input())
list = list(map(int,input().split()))
print(['No','Yes'][max(list) < sum(list)-max(list)])

Solution (Python):
n = int(input())
l = [int(i) for i in input().split()]
m = max(l)
sum = sum(l)
if m < sum-m:
    print('Yes')
else:
    print('No')

Solution (Python):
import sys
input = sys.stdin.readline

n = int(input())
l = list(map(int, input().split()))

M = max(l)
print('Yes' if sum(l)-M > M else 'No')

Solution (Python):
_ = input()
data = list(map(int, input().split()))
data.sort()
if data[-1] < sum(data[:-1]):
  print("Yes")
else:
  print("No")

Solution (Python):
_ = input()
data = list(map(int, input().split()))
data.sort()
if data[-1] < sum(data[:-1]):
  print("Yes")
else:
  print("No")

Solution (Python):
n=int(input())
a=list(sorted(map(int, input().split())))
sum=0
for i in a:
    sum +=i
print("Yes" if 2*a[-1]<sum else "No")

Solution (Python):
n = int(input())
L = list(map(int, input().split()))
L = sorted(L)
if sum(L[:-1]) > L[-1]:
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())
hen_list = list(map(int,input().split()))
if sum(hen_list)-2*max(hen_list) > 0:
    print("Yes")
else:
    print("No")

Solution (Python):
n = input()
a = list(map(int,input().split()))

a = sorted(a)

if sum(a[0:-1]) <= a[-1]:
  print("No")
else:
  print("Yes")

Solution (Python):
n = int(input())
l = list(map(int, input().split()))

l.sort()
l.reverse()
maxl = l.pop(0)
suml = 0
for i in range(len(l)):
  suml += l[i]

if maxl < suml:
  print('Yes')
else:
  print('No')

Solution (Python):
N = int(input())
L = list(map(int, input().split()))

L.sort(reverse=True)
max_edge_length = L[0]
no_max_edge_sum_length = sum(L[1:])

if max_edge_length < no_max_edge_sum_length:
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
print('Yes' if sum(L)-max(L) > max(L) else 'No')

Solution (Python):
N = int(input())
L = [int(_) for _ in input().split()]

print("Yes" if sorted(L)[-1] < sum(sorted(L)[:-1]) else "No")

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
m = max(L)
L.remove(m)
print('Yes' if m < sum(L) else 'No')

Solution (Python):
N=int(input())
L=[int(i) for i in input().split()]
if sum(L)-max(L)*2>0:
    print('Yes')
else:
    print('No')

Solution (Python):
n=int(input())
l=sorted(list(map(int,input().split())))
m=l.pop(-1)
print("Yes" if m<sum(l) else "No")

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
print("YNeos"[sum(l)<=max(l)*2::2])

Solution (Python):
n = int(input())
l = [int(i) for i in input().split()]
l_max = max(l)
del l[l.index(l_max)]
if sum(l) > l_max:
  print("Yes")
else:
  print("No")

Solution (Python):
N = int(input())
L = list(map(int, input().split()))

if max(L) * 2 < sum(L):
    print("Yes")
else:
     print("No")

Solution (Python):


def main():
    N = int(input())
    L = map(int, input().split())

    Llist = list(L)
    Llist.sort(reverse=True)
    numlist = []


    for i in range(1,N):
        numlist.append(Llist[i])

    if Llist[0] < sum(numlist):
        print('Yes')
    else:
        print('No')

if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
maxi = max(L)

if maxi < sum(L) - maxi:
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
if 2*max(L)<sum(L):
  print("Yes")
else:
  print("No")

Solution (Python):
n = int(input())
l = list(map(int, input().split()))

m = (max(l))

if m < sum(l) - m :
	print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())
L = sorted([int(i) for i in input().split()], reverse=True)

print("Yes" if L[0] < sum(L[1:]) else "No")

Solution (Python):
N = int(input())
L = list(map(int,input().split()))
L.sort()
sum = 0
for i in range(N-1):
    sum += L[i]
if L[N-1] < sum:
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())
L = sorted([int(i) for i in input().split()])

print("Yes" if L[N - 1] < sum(L[:N - 1]) else "No")

Solution (Python):
import numpy as np
n = int(input())
L = [int(j) for j in input().split()]
if 2 * max(L) < np.sum(L):
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())
length = list(map(int, input().split()))
maxl = max(length)
index = length.index(maxl)
length.pop(index)

if maxl < sum(length):
    print('Yes')
else:
    print('No')

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
a.sort(reverse = True)
if a[0]<sum(a[1:]):
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())
square = list(map(int,input().split()))

if max(square) < (sum(square) - max(square)):
  print("Yes")
else:
  print("No")

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
print('Yes' if max(l)<sum(l)-max(l) else 'No')

Solution (Python):
N = int(input())
L = [int(a) for a in input().split(" ")]
print("Yes" if sum(L)>2*max(L) else "No")

Solution (Python):
N = int(input())
L = list(map(int,input().split()))

l = sorted(L)
su = 0
for i in range(N-1):
    su += l[i]
    
if l[-1] < su:
    print('Yes')
else:
    print('No')

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
if max(a)<sum(a)-max(a):
  print("Yes")
else:
  print("No")

Solution (Python):
N = int(input())
L = list(map(int, input().split()))

print('Yes' if max(L) * 2 < sum(L) else 'No')

Solution (Python):
n = int(input())
l = list(map(int, input().split()))

max_l = max(l)
sum_l = sum(l)

if max_l < sum_l - max_l:
    print("Yes")
else:
    print("No")

Solution (Python):
n,*l=map(int,open(0).read().split());print('YNeos'[max(l)>=sum(sorted(l)[:-1])::2])

Solution (Python):
n = int(input())
l = list(map(int, input().split()))

M = max(l)
S = sum(l)

if M*2<S :
    s = 'Yes'
else:
    s = 'No'
    
print(s)

Solution (Python):
n = int(input())
l = list(map(int,input().split()))
print('Yes' if (sum(l)-max(l)) > max(l) else 'No')

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
l = sorted(l, reverse=True)
if l[0] < sum(l[1:]):
    print('Yes')
else:
    print('No')

Solution (Python):
import math
a = int(input())
A = []
for i in range(1):
    A = list(map(int, input().split()))
if max(A) < sum(A) - max(A):
    print('Yes')
else:
    print('No')

Solution (Python):
n = int(input())
list1=list(map(int, input().split()))
t= 2*max(list1)- sum(list1)
if t < 0:
  print("Yes")
else:
  print("No")

Solution (Python):
N = int(input())

maxL = 0
total = 0
for i in input().split():
    tmp = int(i)
    if maxL < tmp:
        maxL = tmp
    
    total = total + tmp

total = total - maxL
if maxL < total:
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())

L = list(map(int, input().split()))

L.sort()
long = L[-1]

ans = 0
for i in range(N-1):
    ans += L[i]

if ans > long:
    print ('Yes')
else:
    print ('No')

Solution (Python):
n = int(input())
l = [int(_) for _ in input().split()]

maxs = max(l)
if maxs < sum(l)-maxs:
    ans = 'Yes'
else:
    ans = 'No'
print(ans)

Solution (Python):
n=int(input())
list=list(map(int,input().split()))
print('Yes' if max(list) < sum(list)-max(list) else 'No')

Solution (Python):
A = int(input())

B = input().split()
C = 0
for i in B:
    if C <= int(i):
        C = int(i)

B.remove(str(C))
D = 0
for i in B:
    D += int(i)

if D > C:
    print('Yes')
else:
    print('No')

Solution (Python):
from functools import reduce
from operator import add
N = int(input())
A = list(map(int, input().split()))
A_max = max(A)
A.remove(A_max)



if A_max < reduce(add ,A):
    print('Yes')
else:
    print('No')

Solution (Python):
n = int(input())
li = list(map(int,input().split(' ')))

li = sorted(li)
max_len = li[-1]
sum_len = sum(li[:-1])

if max_len >= sum_len:
    print('No')
else:
    print('Yes')

Solution (Python):


def solve():
    N = int(input())
    L = list(map(int, input().split()))
    L.sort()
    
    longest = L[-1]
    sum = 0
    for i in range(len(L)-1):
        sum += L[i]
    
    if longest < sum:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    solve()

Solution (Python):
N = int(input())
L = list(map(int, input().split()))

mx = max(L)
els = sum(L) - mx

if mx < els:
    print('Yes')
else:
    print('No')

Solution (Python):
a=int(input())
i=list(map(int,input().split()))

s=max(i)
d=sum(i)-s

if d > s:
 print("Yes")
else:
 print("No")

Solution (Python):
N=int(input())
L=[int(i) for i in input().split()]
L.sort()
print("Yes") if sum(L[0:N-1])>L[N-1] else print("No")

Solution (Python):
if __name__ == "__main__":
    N = int(input())
    L_list = list(map(int, (input().split(' '))))
    L_list.sort(reverse=True)
    L_max = L_list.pop(0)
    L_sum = sum(L_list)
    if L_sum > L_max:
        print('Yes')
    else:
        print('No')

Solution (Python):
n = int(input())
l = list(map(int, input().split()))

max_l = max(l)
sum_l = sum(l) - max_l
if max_l < sum_l:
    print("Yes")
else:
    print("No")

Solution (Python):
N=int(input())
L=list(map(int,input().split()))
if max(L)<sum(L)-max(L):
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())
L = list(map(int, input().split()))

max_len = max(L)
sum = 0
for i in L:
    sum += i
sum -= max_len

print("Yes" if sum > max_len else "No")

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
m=max(l)
if sum(l)-2*m>0:
  print('Yes')
else:
  print('No')

Solution (Python):
n = int(input())
l = list(map(int, input().split()))

l.sort()
if l[-1] >= sum(l[:-1]):
    print('No')
else:
    print('Yes')

Solution (Python):
N = int(input())
L = [int(x) for x in input().split()]

L = sorted(L, reverse=True)
if L[0] < sum(L[1::]):
    print('Yes')
else:
    print('No')

Solution (Python):
n,*l,=map(int,open(0).read().split())
l=sorted(l,reverse=True)
print('Yes' if max(l)<sum(l[1:]) else 'No')

Solution (Python):
n = int(input())
l = list(map(int, input().split()))

l.sort()

if 2 * l[-1] < sum(l):
  print("Yes")
else:
  print("No")

Solution (Python):
inpl = lambda: list(map(int,input().split()))
N = int(input())
L = inpl()
L.sort()
if sum(L[:-1]) > L[-1]:
    print('Yes')
else:
    print('No')

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
max = 0
sm = 0

for i in l:
    if max <= i:
        max = i

for i in l:
    sm += i

if (sm - max) > max:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
x = max(l)
s = sum(l)
if x < (s-x):
    print("Yes")
else:
    print("No")

Solution (Python):

import sys
from math import *
from itertools import *
from collections import *
from functools import *
try:
    from math import gcd
except Exception:
    from fractions import gcd

YES = "Yes"  
NO = "No"  

def solve(N: int, L: "List[int]"):
    ll = sorted(L)
    return YES if ll[-1] < sum(ll[:-1]) else NO


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    L = [ int(next(tokens)) for _ in range(N) ]  
    result = solve(N, L)
    print(result)

if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
l.sort()
max=l.pop(-1)
if max<sum(l):
    print("Yes")
else:
    print("No")

Solution (Python):
a=input()
b=[int(i) for i in input().split()]
print(["No","Yes"][sum(b)>2*max(b)])

Solution (Python):
N = int(input())
L = sorted([int(i) for i in input().split()])
print("No") if L[-1] >= sum(L[:-1]) else print("Yes")

Solution (Python):

n = input()
l = list(map(int, input().split()))

l_max = max(l)
l_sum = sum(l)

if (l_max) < (l_sum - l_max):
	print("Yes")
else:
	print("No")

Solution (Python):
n = int(input())
lstl = list(map(int,input().split()))
x = max(lstl)
lstl.remove(max(lstl))
if x<sum(lstl):
  print("Yes")
else:
  print("No")

Solution (Python):
n = input()
l = map(int,input().split())
ld = sorted(l, reverse=True)
m = ld[0]
h = sum(ld[1:])
if m < h:
  print("Yes")
else:
  print("No")

Solution (Python):
N = int(input())
L = list(map(int,input().split()))
if max(L) < sum(L) - max(L):
  print("Yes")
else:
  print("No")

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
m = max(L)
print(["No", "Yes"][sum(L) - m > m])

Solution (Python):
N = int(input())

l = list(map(int, input().split()))
l.sort(reverse=True)

print('Yes' if l[0] < sum(l[1:]) else 'No')

Solution (Python):
N = int(input())

l_arr = list(map(int,input().split()))

l_max = max(l_arr)

for i in range(len(l_arr)):
    if l_arr[i] == l_max:
        break

l_arr.pop(i)

if sum(l_arr) > l_max:
    print("Yes")
else:
    print("No")

Solution (Python):
N=int(input())
L=list(map(int,input().split()))
if max(L)>=(sum(L)-max(L)) :
  print("No")
else :
  print("Yes")

Solution (Python):
n = int(input())
l = [int(i) for i in input().split()]
l.sort()
if 2 * max(l) - sum(l) < 0:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
edges = sorted(list(map(int, input().split())))

print( "Yes" if edges[-1] < sum(edges[:-1]) else "No" )

Solution (Python):
N=int(input())
i=0
L=[int(i) for i in input().split()]

L.sort()
L.reverse()

x=0
for j in range(N):
    x=x+L[j]

y=x-L[0]

if L[0]<y:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
L.sort(reverse=True)
print("Yes" if (L[0] < sum(L[1:])) else "No")

Solution (Python):
import numpy as np

N = int(input())
L = list(map(int, input().split()))

L_max = np.max(L)
L_sum = sum(L)
Ln_sum = sum(L) - L_max
if L_max < Ln_sum :
    print('Yes')
else:
    print('No')

Solution (Python):
n = int(input())
l=list(map(int, input().split()))  

maxl = max(l)
suml = sum(l) - maxl

if maxl < suml:
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())
Length = list(map(int, input().split()))
if sum(Length) > 2*max(Length):
  print("Yes")
else:
  print("No")

Solution (Python):
N = int(input())
L = list(map(int,input().split()))

max_L = max(L)
L.remove(max_L)
if sum(L)> max_L:
    print('Yes')
else:
    print('No')

Solution (Python):
n=int(input())
l=list(map(int, input().split()))
l.sort()
print('Yes' if l[-1] < sum(l[:-1]) else 'No')

Solution (Python):
n = int(input())
llist = [int(l) for l in input().split()]

maxl = 0
for l in llist:
    maxl = max(l, maxl)

suml = 0
maxl_checker = maxl
for l in llist:
    if l == maxl_checker:
        maxl_checker = -1
        continue
    suml += l

print('Yes' if maxl < suml else 'No')

Solution (Python):
n = int(input())
L = list(map(int, input().split()))
L = sorted(L)
print("Yes" if L[-1] < sum(L[:-1]) else "No")

Solution (Python):
N = int(input())
L = list(map(int,input().split()))

Max = max(L)
L.remove(Max)

X = 0
for i in range(N - 1):
    X += L[i]

if Max < X:
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
count = 0
idx = L.index(max(L))
for i in range(N):
    if i != idx:
        count += L[i]
if count > max(L):
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
x = max(l)
y = sum(l) - x
if x < y:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
L = list(map(int, input().split()))

if max(L) < sum(L)-max(L):
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())
llst = list(map(int, input().split()))
llst.sort(reverse=True)
p = 0
for i in range(N - 1):
    p += llst[i + 1]
if llst[0] < p:
    print('Yes')
else:
    print('No')

Solution (Python):

N = int(input())
Ls = sorted(list(map(int,input().split())))
print("Yes" if max(Ls) < sum(Ls) - max(Ls) else "No")

Solution (Python):

N = int(input())
Ls = sorted(list(map(int,input().split())))
print( "Yes" if Ls.pop() < sum(Ls) else "No")

Solution (Python):
N = int(input())

L = [int(i) for i in input().split()]

L.sort(reverse = True)

sum = 0
for i in L[1:]:
    sum += i
if sum > L[0]:
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
max_L = max(L)
for i in range(N):
    if max_L == L[i]:
        del L[i]
        break
if max_L < sum(L):
    print("Yes")
else:
    print("No")

Solution (Python):
N =int(input())
L =[int(j) for j in input().split()]
if max(L) < sum(L)-max(L):
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())
 
L = list(map(int, input().split()))

a = L.pop(L.index(max(L)))

sum = 0

for i in L : 
    sum += i
    
if a < sum : print("Yes")
else : print("No")

Solution (Python):

n = int(input())
lst = sorted(list(map(int, input().rstrip().split())))
print("Yes" if sum(lst) > lst[-1] * 2 else "No")

Solution (Python):
n = int(input())
l = list(map(int, input().split()))

sum = 0
for i in range(n):
    sum += l[i]

if max(l) < sum - max(l):
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
if max(L) * 2 < sum(L):
	print("Yes")
else:
	print("No")

Solution (Python):
N = int(input())
Ln = list(map(int, input().split()))

M = max(Ln)

if M < sum(Ln)-M:
    print('Yes')
else:
    print('No')

Solution (Python):
n = int(input())
l = list(map(int,input().split()))

if max(l) < sum(l)-max(l):
    print('Yes')
else:
    print('No')

Solution (Python):
n = int(input())
li = list(map(int, input().split()))
long = max(li)
li.remove(long)
s = 0
for i in li:
  s += i
if s > long:
  print("Yes")
else:
  print("No")

Solution (Python):
n = int(input())
l = list(map(int,input().split()))

if max(l)<sum(l)-max(l):
    print("Yes")
else:
    print("No")

Solution (Python):

N =int(input())
L =[int(j) for j in input().split()]
if max(L) < sum(L)-max(L):
    print('Yes')
else:
    print('No')

Solution (Python):
n=int(input())
li=list(map(int,input().split()))
m=max(li)
sum=0
for i in range(n):
    sum+=li[i]
if m<sum-m:
    print('Yes')
else:
    print('No')

Solution (Python):
n = int(input())
s = input().split()
s = [int(c) for c in s]
Sum = 0

Max = max(s)

for i in range(n):
    Sum += s[i]
    
if Max < Sum - Max:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
L =  input().split()
sum_len = 0

L_i = [int(s) for s in L]
L_i.sort()

for i in range(N-1):
    sum_len = sum_len + int(L_i[i])

if sum_len > int(L_i[N-1]):
    print('Yes')
else :
    print('No')

Solution (Python):
N = int(input())
list1 = []
goukei = 0
list1 = list(map(int, input().split()))
list1 = sorted(list1, reverse=True)
N_max = list1[0]
goukei = sum(list1[1:])
if N_max < goukei:
  print("Yes")
else:
  print("No")

Solution (Python):
N = int(input())
L = list(map(int, input().rstrip().split()))
print('Yes' if sum(L) - 2*max(L) >0 else 'No')

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
L.sort()
if sum(L[:-1]) > L[-1]:
  print("Yes")
else:
  print("No")

Solution (Python):
N = int(input())
Ln = list(map(int,input().split()))

Ln = sorted(Ln,reverse=True)

print("Yes" if Ln[0] < sum(Ln[1:]) else "No")

Solution (Python):
n=input()
l=list(map(int,input().split()))
l.sort()
x=l.pop(-1)
print("Yes" if sum(l)>x else "No")

Solution (Python):
n = int(input())
l = list(map(int,input().split()))
if max(l) < sum(l)-max(l):
    print("Yes")
else:
    print("No")

Solution (Python):

_ = int(input())
l = list(map(int, input().split()))

print("Yes" if max(l) < sum(l)-max(l) else "No")

Solution (Python):
n = int(input())
nums = list(map(int, input().split()))
m = max(nums)


if m < sum(nums) - m:
    print("Yes")
else:
    print("No")

Solution (Python):


n = int(input())

a = list(map(int, input().split()))

a.sort()

b = a.pop(-1)
 
if b < sum(a):
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())
L = list(map(int, input().split()))

L.sort()
L.reverse()
sumL = sum(L) - L[0]

if L[0] < sumL:
    print("Yes")
else:
    print("No")

Solution (Python):
def solve(n_list):
    max_len = max(n_list)
    max_key = n_list.index(max_len)

    n_list.pop(max_key)
    else_len = sum(n_list)

    return "Yes" if else_len > max_len else "No"


def main():
    n = int(input())
    n_list = list(map(int, input().split()))

    ans = solve(n_list)
    print(ans)


main()

Solution (Python):
N=input()
L=list(map(int,input().split()))
if sum(L)-2*max(L) > 0:
  print('Yes')
else:
  print('No')

Solution (Python):
a = int(input())
b = list(map(int, input().split()))
c = max(b)
d = sum(b) - max(b)

if c < d:
  print('Yes')
else:
  print('No')

Solution (Python):
N = int(input())
L = [int(num) for num in input().split()]
if max(L) < sum(L) - max(L):
  print("Yes")
else:
  print("No")

Solution (Python):
n = int(input())
m = sorted(list(map(int, input().split())))

print("Yes" if m[n - 1] * 2 < sum(m) else "No")

Solution (Python):
n = int(input())
l = list(map(int,input().split()))

max_L = max(l)
sum_L = sum(l) - max_L

print('Yes' if sum_L > max_L else 'No')

Solution (Python):
N = int(input())
L = list(map(int, input().split()))

max_l = max(L)
sum_l = sum(L) - max_l

if sum_l > max_l:
    print('Yes')
else:
    print('No')

Solution (Python):
n = int(input())
sl = list(map(int, input().split(" ")))

if( max(sl) < (sum(sl)-max(sl) )):
    print("Yes")
else:
    print("No")

Solution (Python):
N=int(input())
L=list(map(int,input().split()))
a=max(L)
b=sum(L)-a
if(a<b):
  print('Yes')
else:
  print('No')

Solution (Python):



n = int(input())

l = list(map(int,input().split()))

if max(l) < sum(l)-max(l):
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
L = list(map(int,input().split()))
L.sort()
print("NYoe s"[1 if (sum(L) - L[-1] > L[-1]) else 0::2])