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 = [int(i) for i in input().split()]

l.sort(reverse = True)

if len(l) == n:
  lm = l[0]

  del l[0]

  if int(lm) < sum(l):
    print('Yes')
  else:
    print('No')
else:
  print('No')

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

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

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

for i in range(int(N)):
    sides_total += int(sides_length[i])
sides_max = max(sides_length)
total_Nomax = int(sides_total) - int(sides_max)

if int(sides_max) < int(total_Nomax):
    print("Yes")
else:
    print("No")

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

    sum_l = sum(l)
    for a in l:
        if a >= sum_l - a:
            return "No"
    return "Yes"

print(f())

Solution (Python):

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

Solution (Python):
num = int(input())
edges = list(map(int, input().split(' ')))
answer = "Yes"
for edge in edges:
    if sum(edges) <= edge * 2:
        answer = "No"
        break
print(answer)

Solution (Python):
print((lambda l:['No','Yes'][sum(l[:-1])>l[-1]])(sorted(list(map(int,input().split()+input().split()))[1:])))

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

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

Solution (Python):
n = int(input())
str = input()
all = str.split()
L_all= [int(s) for s in all]
L_all = sorted(L_all)
other = L_all[:n-1]
L_sum=sum(other)
last = L_all[n-1]
if L_sum > last:
    print("Yes")
if L_sum <= last:
    print("No")

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

Solution (Python):
n = int(input())
l = list(map(int,input().split()))
m = sorted(l, reverse = True)
add = 0
for i in range(1, n, 1):
    add += m[i]
if m[0] < add:
    print("Yes")
else:
    print("No")

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

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

Solution (Python):
N = int(input())
Ls = input().split()
for i in range(N):
    Ls[i] = int(Ls[i])
max_L = max(Ls)
sum_others = sum(Ls) - max_L
if max_L < sum_others:
    print("Yes")
else:
    print("No")

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

max_L = max(LList)
isFirstMax_L = 0
sumOtherL = 0

for i in LList :
    if i == max_L and isFirstMax_L == 0:
        isFirstMax_L = 1
        continue
    sumOtherL += i

if max_L < sumOtherL :
    print("Yes")
else :
    print("No")

Solution (Python):
a = int(raw_input())
b = raw_input()
num_list_str = b.split(" ", a)
num_list = [int(s) for s in num_list_str]
maxnum = max(num_list)
num_list.remove(maxnum)
if maxnum < sum(num_list):
  print "Yes"
else:
  print "No"

Solution (Python):
def main():
    n = int(input())
    k = [int(s) for s in input().split()]
    k.sort(reverse=True)

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

main()

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

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

Solution (Python):
times=int(input())
side=input().split(" ")
maax=0
suum=0
check=0
for i in side:
    suum+=int(i)

for i in side:
    if suum-int(i)<=int(i):
        check+=1
        break;

if check==0:
    print("Yes")
else:
    print("No")

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

Solution (Python):
n = input()
EdgeLength=input().split()

N = int(n)
EdgeLength = [int(i) for i in EdgeLength]



EdgeLength.sort()


sumL = sum(EdgeLength) - EdgeLength[N-1]



if EdgeLength[N-1] < sumL:
    print("Yes")
else:
    print("No")

Solution (Python):

N = int(input())
L = list(map(int, input().split()))
L.sort()
if L[N-1] * 2 < sum(L):
    print('Yes')
else:
    print('No')

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

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

Solution (Python):
N = int(input())
X = map(int, input().split())
Y = []
for i in X:
    Y.append(i)
sum_x = sum(Y)
max_len = max(Y)

if sum_x > max_len * 2:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
l = sorted(l,reverse=True)
sum1 = 0
for i in range(1,len(l)):
    sum1 += l[i]
if sum1 > l[0]:
    print('Yes')
else:
    print('No')

Solution (Python):


from collections import deque
import itertools as it
import sys
import math

sys.setrecursionlimit(1000000)

N = input()
L = map(float, raw_input().split())

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

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]
maxind = a.index(max(a))
maxnum = a[maxind]
tmp = 0
for i in range(len(a)):
    if i == maxind:
        continue
    tmp += a[i]
msg = 'No'
if maxnum < tmp:
    msg = 'Yes'
print(msg)

Solution (Python):
import numpy as np

m = list(map(int, input().split()))
m2 = list(map(int, input().split()))
n = m[0]
l = m2

lnp = np.asarray(l)
lmax = np.max(lnp)
lsum = np.sum(lnp) - lmax

if(lsum > lmax):
    print('Yes')
else:
    print('No')

Solution (Python):
s = [input() for i in range(2)]
sides = [int(i) for i in s[1].split()]
sides = sorted(sides,reverse=True)
long_side= sides.pop(0)

total = 0
for side in sides:
  total += side
  
if long_side < total:
  print("Yes")
else:
  print("No")

Solution (Python):
N=input().rstrip().split(" ")
lst=input().rstrip().split(" ")
int_lst=[]
N_sum=0

for i in range(len(lst)):
    int_lst.append(int(lst[i]))
int_lst.sort(reverse=True)

for i in range(len(lst)-1):
  N_sum+=int(int_lst[i+1])

if int_lst[0] < N_sum:
    print("Yes")
else:
    print("No")

Solution (Python):
N = input()
a = list(map(int, input().split()))
a.sort()
max = a.pop()
sum = 0
for b in a:
    sum += b
if sum > max:
    print("Yes")
else:
    print("No")

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

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

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

max = max(l);
l.remove(max);

all = 0

for p in l:
    all+=p

if all > max:
	print("Yes")
else:
	print("No")

Solution (Python):
n = int(input())
a = map(int,input().split())
a = sorted(a)
a = reversed(a)
a = list(a)
b = "Yes"
c = 0
for i in range(1,n):
     c += a[i]
if a[0] >= c:
    b = "No"
print(b)

Solution (Python):
N=int(input())
A=list(map(int,input().split()))
Amax=max(A)
wa=0
for i in A:
    wa=wa+i
if wa>Amax*2:print("Yes")
else:print("No")

Solution (Python):
import math
import sys
n = int(raw_input())
l = map(int, raw_input().split())
l.sort()
sum = 0
for i in range(n-1):
	sum += l[i]
if sum > l[n-1]:
	print("Yes")
else:
	print("No")

Solution (Python):


n = int(input())
lst_str = input().split()
lst = []
for elem in lst_str:
    lst.append(int(elem))
lst.sort()

max_ = int(lst[-1])
for elem in lst[0:-1]:
    max_ = max_ - int(elem)
if max_ < 0:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
L = [int(i) for i in input().split()]
s = 0
for i in range(N):
    s+=L[i]
if max(L)<s-max(L):
    print('Yes')
else:
    print('No')

Solution (Python):
import sys
N = None

for i,line in enumerate(sys.stdin):
    if i == 0:
        N = int(line)
    if i == 1:
        lines = [int(i) for i in line.split(" ")]
        if (sum(lines) - max(lines)) > max(lines):
            print("Yes")
        else:
            print("No")

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

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

L.sort()
naga = L[N - 1]
hoka = 0
for i in range(0, N-1):
    hoka += L[i]

if hoka > naga:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
li = list(map(int, input().split()))
new_li = sorted(li, reverse=True)
count = 0
max = new_li[0]

for i in new_li:
	count += i

count -= max

if max < count:
	print('Yes')
else:
	print('No')

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

for i in range(N-1):
  sum = sum + l[i]

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

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

for i in range(len(L)):
    L[i] = int(L[i])
    s += int(L[i])

s -= int(max(L))

if s > int(max(L)):
    print('Yes')
else:
    print('No')

Solution (Python):
import numpy as np
N = int(input())
L_list = list(map(int, input().split()))

max_ = max(L_list)
L_list.remove(max_)

if max_ < np.sum(L_list):
    print("Yes")
else:
    print("No")

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

max = max(l)

sum = sum(l)
sum = sum - max

if max < sum:
    print("Yes")

else:
    print("No")

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

print(ans)

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

if (sum(li) - max(li)) > max(li) :
    print("Yes")

else :
    print("No")

Solution (Python):



num = int(input())

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

def get_max(sides):
    idx = 0
    _max = sides[idx]
    
    for i, side in enumerate(sides):
        if _max < side:
            _max = side
            idx = i
    return idx, _max
    
idx, _max = get_max(sides)

total = 0
for i, side in enumerate(sides):
    if i == idx:
        continue
    total += side
    
if _max < total:
    print('Yes')
else:
    print('No')

Solution (Python):



from sys import stdin



import numpy as np


n = int(stdin.readline())
data = np.zeros(n)
d = stdin.readline().split()
for i,x in enumerate(d):
    data[i] = int(x)

max = np.max(data)
if max >= (np.sum(data)-max):
    print("No")
else:
    print("Yes")

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

sum = 0

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

judge = sum - max(lis) - max(lis)

if judge > 0:
    print("Yes")
else:
    print("No")

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

if L_max < sum(L):
    print("Yes")
else:
    print("No")

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

m = max(L)
L.pop(L.index(m))
add = sum(L)
if m < add:
  print("Yes")
else:
  print("No")

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

if sum(L[0:n-1])>L[n-1]:
    print('Yes')
else:
    print('No')

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

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

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

l_max = max(l_list)
result = "Yes"

if(l_max >= sum(l_list)-l_max):
    result = "No"

print(result)

Solution (Python):

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

Lmax = max(Ln)

Ln.remove(Lmax)

if Lmax < sum(Ln):
    print("Yes")
else:
    print("No")

Solution (Python):
def inpl():
    return list(map(int, input().split()))


N = int(input())
L = inpl()

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

Solution (Python):
N = int(input())
incoming = [int(i) for i in input().split(' ')]
max_val = max(incoming)
sum_val = sum(incoming) - max_val

if(max_val < sum_val):
    print('Yes')
else:
    print('No')

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

print(ans)

Solution (Python):
def i1():
 return int(input())
def i2():
 return [int(i) for i in input().split()]
n=i1()
l=i2()
ls=sum(l)
s=0
for i in l:
  if ls-2*i<=0:
    s=1
if s==0:
  print("Yes")
else:
  print("No")

Solution (Python):
import copy
import itertools

def funcF(p):
    return p

def funcG(p):
    return funcF(p) + p*p

N = int(input())



L = list(int(i) for i in input().split())
L.sort()


S=0
for i in L[:N-1]:
    S += i

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

Solution (Python):

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


L = list(reversed(sorted(L)))

longest = L[0]
add = 0
for n in L[1:]:
    add += n
if add > longest:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(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):
import sys
n = int(input())
l = list(map(int, input().split()))
if (max(l) * 2 < sum(l)):
  print('Yes')
else:
  print('No')

Solution (Python):
def judge(N,L):
    max_length = 0
    max_index = -1
    for i in range(N):
        if(L[i]>max_length):
            max_length = L[i]
            max_index = i
    del L[max_index]
    
    if(sum(L)>max_length):
        return print('Yes')
    else:
        return print('No')
    
if __name__ == '__main__':
    N = int(input())
    L = input().split()
    for i in range(N):
        L[i] = int(L[i])
    judge(N,L)

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

lmax = max(l)
lsum = -lmax
for i in l:
    lsum += i

if lmax<lsum:
    print("Yes")
else:
    print("No")

Solution (Python):
N=int(input())
L=list(int(i) for i 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()))

summ = 0
n = l[0]

for i in l[1:]:

  if n < i:  
    summ += n
    n = i
   
  else:
    summ += i
    
if n < summ:
  print('Yes')
  
else:
  print('No')

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

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

maximum=int(max(length))
goukei=int(sum(length))




if 2*maximum<goukei:
  print("Yes")
else:
  print("No")

Solution (Python):
N = int(input())
L = input().split()
Lng=0
sumL=0
for i in range(N):
    if Lng<int(L[i]):
        sumL=sumL+Lng
        Lng=int(L[i])
    else:
        sumL=sumL+int(L[i])
    
    
if Lng<sumL:
    print("Yes")
else:
    print("No")

Solution (Python):
input()

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

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

Solution (Python):
N = input().rstrip()
N = int(N)
num = N-1
Line = input().rstrip().split()
line = [int(s) for s in Line]
line.sort()
MAX = line[num]
line.pop(num)

SUM = sum(line)

if MAX < SUM :
    print("Yes")
else:
    print("No")

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

l.sort(reverse = True)

max = l[0]
sum = 0
for i in range(1, n):
  sum += l[i]
  
if sum > max:
  print('Yes')
else:
  print('No')

Solution (Python):
N_corner = int( input() )
  
line = input()

line_value = line.split()
line_value = [ int(value) for value in line_value ]

longest = int( max( line_value ) )

total = sum(line_value)

rest = total - longest

if longest < rest:
  print('Yes')
else :
  print('No')

Solution (Python):
import numpy as np
n = input()
n = int(n)
ls = input()
ls = ls.split()
for i in range(n):
  ls[i] = int(ls[i])


M = np.argmax(ls)
if (ls[M] < (sum(ls)-ls[M])):
    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('Yes')
else:
    print('No')

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

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

if(sum(L)-2*max(L)>0):
    print('Yes')
else:
    print('No')

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

Solution (Python):
N = int(raw_input())
L = map(int, raw_input().split())
largest = max(L)
sum_l = 0
L.remove(max(L))
for i in range(0, N-1):
	sum_l += L[i]
ans = "Yes" if (largest < sum_l) else "No"
print ans

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

maxdata = max(llist)
llist.remove(maxdata)

if maxdata < sum(llist):
  print('Yes')
else:
  print('No')

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
L.sort()
max_L = L.pop()
sum_L = sum(L)

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

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

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

l.sort()

for i in range(n-1):
    sum += l[i]
if l[-1] < sum:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
Ls = sorted(map(int, input().split(' ')))

Ls, L_max = Ls[:-1], Ls[-1]
L_sum = sum(Ls)

print('Yes' if L_max < L_sum else 'No')

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

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

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


max=0
s=0
for i in range(len(L)):
    s+=L[i]
    if max<L[i]:
        max=L[i]
S=s-max

if max<S:
    print("Yes")
else:
    print("No")

Solution (Python):

"""
https://atcoder.jp/contests/abc117/tasks/abc117_a
"""

def sol(n, S):
    maxi = max(S)
    ttl = sum(S)
    others = ttl - maxi
    print('Yes' if maxi < others else 'No')

test = False
if test:
    n = 4
    S =list( map(int, "3 8 5 1".split()))
    sol(n, S)

    n = 4
    S =list( map(int, "3 8 4 1".split()))
    sol(n, S)

    n = 10
    S =list( map(int, "1 8 10 5 8 12 34 100 11 3".split()))
    sol(n, S)


else:
    n = int(input())
    S =list( map(int, input().split()))
    
    sol(n, S)

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

l.sort()
lst.append(l[-1])

for i in range(0,n-1):
    lst2.append(l[i])

print("No") if sum(lst) >= sum(lst2) else  print("Yes")

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

Solution (Python):


def main():
    int(input())
    l = [int(e) for e in input().split(" ")]
    max_l = max(l)
    s = 0
    once = True
    for e in l:
        if e == max_l and once:
            once = False
            continue
        s += e

    if max_l < s:
        print("Yes")
    else:
        print("No")

main()

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

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

Solution (Python):
a = int(input())
array = list(map(int, input().strip().split(' ')))
array.sort()
array.reverse()
sum = 0
for i in range(a-1):
  sum = sum+array[i+1]

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

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

L2 = sorted(L)

if sum(L2[0:-1]) > L2[-1]:
    print("Yes")
else:
    print("No")

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

max_num = max(num_li)
sum_num = sum(num_li)
ans_num = sum_num - max_num

if max_num < ans_num:
  print('Yes')
else:
  print('No')

Solution (Python):
N = input()
list_L = list(map(int, input().split()))
longest = max(list_L)
list_L.remove(longest)
left = 0
for l in list_L:
    left += l
if longest < left:
    print("Yes")
else:
    print("No")

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

a.sort()
if a[-1] < sum(a[0:N-1]):
  print('Yes')
else:
  print('No')

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

Solution (Python):
n = int(input())
l = sorted([int(n) for n in input().split()], reverse=True)

other = 0
for i in range(1, n):
    other = other + int(l[i])

if int(l[0]) < other:
    print("Yes")
else:
    print("No")

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

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

Solution (Python):
N = int(input())
L = [int(_) for _ in input().split()]
L.sort(reverse=True)
 
if L.pop(0) < sum(L):
    print('Yes')
else:
    print('No')

Solution (Python):
n = int(input())
A = list(map(int, input().split()))
B = sorted(A,reverse=True)
if max(B) - sum(B) + max(B)  < 0:
  print("Yes")
else:
  print("No")

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

Solution (Python):
n = int(input())
sides = [int(i) for i in input().split()]
maxside = max(sides)
sides.remove(maxside)
if maxside < sum(sides):
    print("Yes")
else:
    print("No")

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

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

Solution (Python):
X = input()
Polygon = list(map(int, input().split()))

Polygon.sort(reverse = True)

if sum(Polygon[1:]) > Polygon[0]:
    print("Yes")
else:
    print("No")

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

longest=max(l)
l.remove(longest)

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

Solution (Python):
data = input().split()  
n = int(data[0])


l = [int(s) for s in input().split()]

sum=sum(l)
max=max(l)

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

Solution (Python):
N = input()
Ls = [int(v) for v in input().split()]

maxL = max(Ls)
Ls.remove(maxL)

if maxL < sum(Ls):
    print('Yes')
else:
    print('No')

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

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

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

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

lengths = list(sorted(lengths))


max_length = lengths.pop()


if max_length < sum(lengths):
	print("Yes")
else:
	print("No")

Solution (Python):
input()
Ls = [int(i) for i in input().split()]
max_arg = Ls.index(max(Ls))
sum_ = sum([v for i,v in enumerate(Ls) if i != max_arg])
print("Yes" if Ls[max_arg] < sum_ else "No")

Solution (Python):

N=int(input())

l = sorted(list(map(int, input().split())))
maxL=l[-1]

sumL=sum(l[:-1])

if maxL<sumL:
	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 print("No")

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

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

L.sort()

a = sum(L) - L[n-1]

if L[n-1] < a:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys

def main(inp):
    N=list(map(int,next(inp).split()))
    L=list(map(int,next(inp).split()))
    
    maxindex = [i for i , x in enumerate(L) if x==max(L)]
    
    maxi=L.pop(maxindex[0])
    
    if sum(L)>maxi:
        print("""Yes
""")
    else: print("""No
""")
      
main(sys.stdin)

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

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

L.sort()

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

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
sum = 0
l.sort()
for i in range(n):
    sum=sum+l[i]
sum=sum-l[n-1]
if sum>l[n-1]:
    print("Yes")
else:
    print("No")

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

max_idx = -1
max_len = -1 
for i in range(N):
    if max_len < L[i]:
        max_len = L[i]
        max_idx = i
        
if sum(L) > max_len * 2:
    print("Yes")
else:
    print("No")

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

L.sort()
L.reverse()

print("Yes" if sum(L) > int(2*L[0]) else "No")

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

max = 0
ignore = 0
temp = 0

for i, value in enumerate(li):
  if value > max:
    max = value
    ignore = i

for i, value in enumerate(li):
  if i == ignore:
    continue
  else:
    temp += value
    
if max < temp:
  print("Yes")
else:
  print("No")

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

l = input().split()

for i in range(len(l)):
    l[i] = int(l[i])

l.sort(reverse = True)

lmax = int(l[0])

lsum = 0

for i in range(len(l)):
    lsum += int(l[i])

lsum -= lmax

if(lmax < lsum):
    print('Yes')
else:
    print('No')

Solution (Python):
def read():
    N = int(input().strip())
    L = map(int, input().strip().split())
    return N, L


def solve(N, L):
    L = sorted(L)
    return "Yes" if L[-1] < sum(L[:-1]) else "No"


if __name__ == '__main__':
    inputs = read()
    print("%s" % solve(*inputs))

Solution (Python):
n = int(input())
line = input().split(" ")
l = []

for i in line:
    l.append(int(i))

if (max(l) < (sum(l) - max(l))):
    print("Yes")
else:
    print("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):
a = input()
b = input().split()
c = []
for i in b:
    c.append(int(i))

c.sort()
sum = 0
for i in c:
    sum += i

if sum - c[-1] > c[-1]:
    print("Yes")
else:
    print("No")

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

L = []

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

saidai = max(L)

goukei  = sum(L)

goukei = goukei - saidai

if saidai < goukei:
    print("Yes")
else:
    print("No")

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

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

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

Solution (Python):
from sys import stdin

n = stdin.readline().rstrip()
l = [int(x) for x in stdin.readline().rstrip().split()]

m = max(l)
l.remove(m)
if m < sum(l):
    print('Yes')
else:
    print('No')

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

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

maxim=max(L_list)
L_list.remove(maxim)

if maxim<sum(L_list):
	print("Yes")
else:
	print("No")

Solution (Python):
N = input()
_line = input()
line = _line.split()
S = 0.0
for i in range(int(N)):
  S += float(line[i])
tag=0
for i in range(int(N)):
  if S > float(line[i])*2:
    continue
  else:
    print("No")
    tag=1
    break
if tag==0:
  print("Yes")

Solution (Python):

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

Lmax = max(L)

Lsum = 0

for i in range(N):
      Lsum = Lsum  +L[i]
Lsum = Lsum  -Lmax 
   

if Lmax < Lsum:
      print("Yes")
else:
      print("No")

Solution (Python):
import sys, copy, math, collections, itertools
n=int(input())
l=list(map(int,input().split()))
m=max(l)
if (sum(l) - m) > m:
    print("Yes")
else:
    print("No")

Solution (Python):
Rep = int(input())
rawdata = [int(i) for i in input().split()]
a = max(rawdata)
b = sum(sorted(rawdata, reverse=True)[1:Rep])
if a < b:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]
a.sort()
x = a.pop()
y = sum(a)
if x < y:
    print("Yes")
else:
    print("No")

Solution (Python):




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

if sum(l) - max(l) * 2 > 0:
  print('Yes')
else:
  print('No')

Solution (Python):
a=input()
c=input()
b=c.split()
b=[int(i) for i in b]
b.sort()
mn=2*b[-1]
s_n=sum(b)
if mn<s_n:
    print("Yes")
else:
    print("No")

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




max_L = max(L)
L.remove(max_L)


op = "Yes" if max_L < sum(L) else "No"
print(op)

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


L.sort()
L.reverse()


sum = 0
for j in range(1,N):
    sum += L[j]

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

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

Solution (Python):

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

c = sum(l)
if a < c:
    print('Yes')
else:
    print('No')

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

max_length = max(L)
L.remove(max_length)

if max_length < 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 = input()
L = input().split()
L_int = [int(l) for l in L]


L_max = max(L_int)

max_index = L_int.index(max(L_int))
L_int[max_index] = 0

if int(L_max) < int(sum(L_int)):
    print('Yes')
else:
    print('No')

Solution (Python):

import numpy as np

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

L_max = max(L)
L_total = np.sum(L)

if L_max < L_total - L_max:
    print('Yes')
else:
    print('No')

Solution (Python):
n = int(input())
list = list(map(int, input().split()))
for i in range(n):
    if list[i] >= sum(list[:i])+sum(list[i+1:]):
        print('No')
        quit()
print('Yes')

Solution (Python):
n = int(input())
lstr = input().split()
ldec = []
sum = 0

for ls in lstr:
    sum += int(ls)
    ldec.append(int(ls))

lmax = max(ldec)

if lmax >= sum - lmax:
    print('No')
else:
    print('Yes')

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

list.sort(reverse = True)

if sum(list[1:]) > list[0]:
    print("Yes")
else:
    print("No")