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):
def read_input():
	n = int(input())
	ls = list(map(int, input().split()))
	
	return n, ls
	
	
def submit():
	n, ls = read_input()
	
	max_l = max(ls)
	rests = sum(ls) - max_l

	if max_l < rests:
		print('Yes')
	else:
		print('No')

if __name__ == '__main__':
	submit()

Solution (Python):
n = int(input())
lst = [int(i) for i in input().split()]
s = sum(lst)
for i in lst:
    if i * 2 >= s:
      print('No')
      quit()
print('Yes')

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()))  

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

Solution (Python):
n = int(input())
L = list(map(int,input().split()))
m_l = max(L)
if m_l < sum(L) - m_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 = [int(i) for i in input().split()]
l.sort(reverse=True)
add = 0
for i in l[1:]:
    add += i
if add > l[0]:
    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):
n=int(input())
L=[int(x) for x in input().split()]

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

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

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

Solution (Python):
a=int(input())
b=input().rstrip().split()
l=[]
for i in range(a):
  l.append(int(b[i]))
l.sort()
max = l[a-1]
SUM=sum(l[:a-1])

if (SUM > max):
  print("Yes")
else:
  print("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):
a=input()
b=list(map(int,input().split()))
b.sort()
if b[len(b)-1]< sum(b[:len(b)-1]):
  print("Yes")
else:
  print("No")

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

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

Solution (Python):


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

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

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

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

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

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

Solution (Python):
import sys

read = sys.stdin.buffer.read
input = sys.stdin.buffer.readline
inputs = sys.stdin.buffer.readlines



























def main():
	n,*l=map(int,read().split())
	lmax=max(l)
	lsum=sum(l)
	ans="No"
	if lmax<lsum-lmax:
		ans="Yes"
	print(ans)
	
	
	
	
	
if __name__ == "__main__":
		main()

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


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

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

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

if 2 * max(ls) >= sum(ls):
  print("No")
else:
  print("Yes")

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())
L = [int(i) for i in input().split()]
longest = L[0]
for i in range(1, len(L)):
    if L[i] > longest:
        longest = L[i]
if 2 * longest < sum(L):
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
l = sorted(list(map(int, input().split())))
if l[-1] >= sum(l[:-1]):
    print('No')
else:
    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):
n=int(input())
lst=list(map(int,input().split()))
maxval=max(lst)
sumval=sum(lst)
if maxval<sumval-maxval:
    print('Yes')
else:
    print('No')

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

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

Solution (Python):
import sys


a = int(input())
b = input()

b = (map(int,b.split()))
b = list(b)

L = b[0]

for i in range(1,a):
    if b[i] > L:
        L = b[i]

j = 0

for i in range(a):
    j += b[i]
    
j -= L

if j > L:
    print("Yes")
else:
    print("No")

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

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

aaa =sum(L_list)-max(L_list)-max(L_list)

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

Solution (Python):
N = int(input())
Larray = list(map(int,input().split()))
lmax = max(Larray)
Larray.remove(lmax)
ltot = 0
for i in Larray:
  ltot += i
if lmax < ltot:
  print('Yes')
else:
  print('No')

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

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

Solution (Python):
N = int(input())
A = [int(i) for i in input().split()]
max_A = max(A)
A.remove(max_A)
if sum(A) > max_A:
    print("Yes")
else:
    print("No")

Solution (Python):
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 = list(map(int, input().split()))

L_list.sort()

if sum(L_list[:-1]) > L_list[-1]:
    print('Yes')
else:
    print('No')

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

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

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

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

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

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

suml = 0
lmax = l[0]
for i in range(n):
  suml += l[i]
  if lmax < l[i]:
    lmax = l[i]

s = suml - lmax
if s > lmax:
  print("Yes")
else:
  print("No")

Solution (Python):
input()
a = list(map(int, input().split()))
print('Yes' if max(a) < sum(a) - max(a) else '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())
lst = list(map(int,input().split()))
a = max(lst)
lst.remove(max(lst))
if a < sum(lst):
    print("Yes")
else:
    print("No")

Solution (Python):
import os, sys, re, math

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(a) for a in input().split()]
if max(l) < sum(l) - max(l):
	print('Yes')
else:
	print('No')

Solution (Python):
import os, sys, re, math

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

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

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

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

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

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

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

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

L.sort(key=lambda x: -x)

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

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

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

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


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
L = list(map(int,input().split()))
L_copy = L.copy()
MAX = max(L)
L_copy.pop(L.index(MAX))


if MAX < sum(L_copy):
  print("Yes")
else:
  print("No")

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

flag = 1
for i in range(N):
  ans = 0
  for j in range(N):
    if i!=j:
      ans += list[j]
    
  if ans <= list[i]:
      flag = 0
      break

if flag:
  print('Yes')
else:
  print('No')

Solution (Python):
input()
ls = list(map(int, input().split()))
lmax = max(ls)
lmaxi = ls.index(lmax)
lss = ls[:lmaxi] + ls[lmaxi+1:]
print("Yes" if lmax < sum(lss) else "No")

Solution (Python):

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

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

Solution (Python):
import numpy as np
n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
b=np.array(a)
if b[0]<b[1:].sum():
  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):
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())
lst = list(map(int, input().split()))
maxn = max(lst)
print ( 'Yes' if maxn < (sum(lst) - maxn) else 'No' )

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

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

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
x=max(a)
if x<(sum(a)-x):
  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 = int(input())

ll = list(map(int,input().split()))
ll = sorted(ll)

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

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

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

Solution (Python):

import sys










def main():
    n, *l = (int(x) for x in sys.stdin.read().split())
    l.sort()
    if l[-1] < sum(l[:-1]):
        ans = 'Yes'
    else:
        ans = 'No'
    print(ans)


if __name__ == "__main__":
    main()

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

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

Solution (Python):
n = int(raw_input())
s = map(int, raw_input().split())

x = sorted(s)

a = x[-1] < sum(x[:-1])

print "Yes" if a else "No"

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

longline = L.pop(L.index(max(L)))
not_longline_total = sum(L)

if longline < not_longline_total:
  print('Yes')
else:
  print('No')

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

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

Solution (Python):
n = int(input())
ll = list(map(int, input().split()))
if max(ll) < sum(ll) - max(ll):
    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()
if 0<sum(L)-2*L[n-1]:
    print("Yes")
else:
    print("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()))
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()
sum = 0
for i in range(N-1):
  sum += L[i]

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

def main():
    n=int(input())
    ll=list(map(int,input().split()))
    m=max(ll)
    s=sum(ll)-m
    if m < s:
        print('Yes')
    else:
        print('No')

main()

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

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

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

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(N: int, L: "List[int]"):
    if 2*max(L) < sum(L):
        print(YES)
    else:
        print(NO)
    return



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 = list(input())
s_L = list(map(int,input().split()))

s_L = list(sorted(s_L,reverse=True))
if s_L[0] < sum(s_L[1:]):
    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):
def solve():
    N, *l = map(int, open(0).read().split())

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


if __name__ == '__main__':
    solve()

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

print('Yes' if L[0] < sum(L)-L[0] else 'No')

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

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 = [int(x) for x in input().split()]
l.sort()
if sum(l[0:n-1])>l[-1]:
  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):
from sys import stdin
import bisect

n = int(stdin.readline().rstrip())
li = list(map(int,stdin.readline().rstrip().split()))

li.sort()

if sum(li[:n-1]) > li[-1]:
    print("Yes")
    exit()

print("No")

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

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

llmax = max(ll)
l_all = 0
for i in ll:
  l_all += i
l_all -= llmax
if llmax < l_all:
  print('Yes')
else:
  print('No')

Solution (Python):
N=input()
L=[int(x) for x in 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()]

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

Solution (Python):
n=int(input())
l=input().split()
ans='Yes'
for i in range(n):
    l[i]=int(l[i])
for j in range(n):
    if l[j]>=sum(l)-l[j]:
        ans='No'
        break
    else:
        continue
print(ans)

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

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

Solution (Python):

n = int(input())

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

l.sort()
if l[n-1] < sum(l[:n-1]):
	print("Yes")
else:
	print("No")

Solution (Python):
N = int(input())
L = list(map(int,input().split()))
sum = 0
maximum = max(L)
L.remove(max(L))
for i in range(len(L)):
  sum += L[i]
if sum>maximum:
  print("Yes")
else:
  print("No")

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

max_l = max(l_list)
l_list.pop(l_list.index(max_l))
sum_l_but_max = sum(l_list)

if max_l < sum_l_but_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('Yes')
else:
    print('No')

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

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

Solution (Python):
N = int(input())
l = sorted(map(int,input().split()))
print("Yes" if l[-1] < sum(l[:-1]) 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):
N = int(input())
L = sorted([int(x) for x in input().split()])
cnt = 0
for l in L[:-1]:
    cnt += l
print('Yes' if (L[-1] < cnt) else '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 = sorted(map(int,input().split()))
print("Yes" if sum(l[:-1]) > l[-1] else "No")

Solution (Python):
a = [input().split() for l in range(2)]
N = int(a[0][0])
L = list(map(int, a[1]))
if max(L)<(sum(L)-max(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()))
L.sort()
m=0
for i in range(N-1):
  m+=L[i]
if m>L[N-1]:
  print("Yes")
else:
  print("No")

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

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

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

l.sort()

for i in range(n - 1):
    x += l[i]

y = l[n - 1]

if x > y:
    print("Yes")
else:
    print("No")

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

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

max_L = 0
sum_L = 0
for i in range(N):
    sum_L += L[i]
    if L[i] > max_L:
        max_L = L[i]
    
sum_L -= max_L
if max_L < sum_L:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
L = [int(i) for i in input().split()]
print("{}".format("Yes" if max(L) < sum(L[:L.index(max(L))] + L[L.index(max(L)) + 1:]) 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):
from sys import stdin
import numpy as np

N = int(stdin.readline().strip())
L = np.array(list(map(int,stdin.readline().strip().split())))

if L.sum()-np.max(L) > np.max(L):
    print('Yes')
else:
    print('No')

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

truth = True
for i in range(len(lengths)):
	curr = lengths[:i]+lengths[i+1:]
	if sum(curr) <= lengths[i]:
		truth = False
		break
	
print(["No","Yes"][truth])

Solution (Python):
size = int(input())
sides = [int(x) for x in input().split()]
sides.sort()
big = sides[-1]
smalls = sum(sides) - big
if smalls > big:
  print("Yes")
else:
  print("No")

Solution (Python):
n = int(input())
sides = []
sides2 = input()
sides2 = sides2.split()
for i in sides2:
  sides.append(int(i))
maxim = max(sides)
if maxim>=sum(sides)-maxim:
  print("No")
else:
  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):
N = int(input())
L = list(map(int,input().split()))
sL = sum(L)
for i in range(N):
    if sL-L[i] <= L[i]:
        print("No")
        exit()
print("Yes")

Solution (Python):

def main():
    N, *L = map(int, open(0).read().split())
    L.sort()
    flg = sum(L[:-1]) > L[-1]
    print("Yes" if flg else "No")


if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
lis = tuple(map(int, input().split()))
bl = sum(lis) - max(lis) * 2 > 0
print('Yes' if bl 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):
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()))
if max(l) < sum(l) - max(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):


def main():
    N = int(input())
    L =  [int(s) for s in input().split()]
    most_long = 0
    other_longs = 0
    for l in L:
        if(l>most_long):
            other_longs += most_long
            most_long = l
        else:
            other_longs += l
    if(other_longs>most_long):
        print('Yes')
    else:
        print('No')



if __name__ == "__main__":
    main()

Solution (Python):


def main():
    N = int(input())
    L =  [int(s) for s in input().split()]
    most_long = 0
    other_longs = 0
    for l in L:
        if(l>most_long):
            other_longs += most_long
            most_long = l
        else:
            other_longs += l
    if(other_longs>most_long):
        print('Yes')
    else:
        print('No')



if __name__ == "__main__":
    main()

Solution (Python):


def main():
    N = int(input())
    L =  [int(s) for s in input().split()]
    most_long = 0
    other_longs = 0
    for l in L:
        if(l>most_long):
            other_longs += most_long
            most_long = l
        else:
            other_longs += l
    if(other_longs>most_long):
        print('Yes')
    else:
        print('No')



if __name__ == "__main__":
    main()

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()))
total = 0
answer = "Yes"
for i in L:
    total += i
for i in L:
    if i < total - i:
        continue
    else:
        answer = "No"
        break
print(answer)

Solution (Python):
def main():
    N = int(input())
    L =  [int(s) for s in input().split()]
    most_long = 0
    other_longs = 0
    for l in L:
        if(l>most_long):
            other_longs += most_long
            most_long = l
        else:
            other_longs += l
    if(other_longs>most_long):
        print('Yes')
    else:
        print('No')



if __name__ == "__main__":
    main()

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

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

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

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

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

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

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

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

if sum(a)-max(a)*2 > 0:
    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())
l= list(map(int, input().split()))
if sum(l)>2*max(l):
    print('Yes')
else:
    print('No')

Solution (Python):
n, *l = map(int, open(0).read().split())

max = 0
total = 0
for i in range(0, n):
    if l[i] > max:
        total += max
        max = l[i]
    else:
        total += l[i]

if max >= total:
    print('No')
else:
    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):
N = int(input())
l = [int(x) for x in 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()))
ll = max(l)
def judge():
    if sum(l) - ll > ll:
        return 'Yes'
    else:
        return 'No'
print(judge())

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

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

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

m = max(L)
L.remove(m)

print("Yes" if sum(L) > m else "No")

Solution (Python):
N=input()
L=list(map(int,input().split()))
s=0
for i in L:
  s+=i
if 2*max(L)<s:
  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().split()[0])
l_list = list(map(int, input().split()))

max_l = max(l_list)
t = sum(l_list) - max_l
ans = "Yes" if max_l < t else "No"

print(ans)

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

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

Solution (Python):
def solve():
    m = max(li)
    li.remove(m)
    if (m < sum(li)):
        print('Yes')
    else:
        print('No')


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

solve()

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

A = L[0]
B = sum(L) - A

if B > A:
    print('Yes')
else:
    print('No')

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(N: int, L: "List[int]"):
    m = max(L)
    print(YES if m < sum(L) - m else NO)
    return



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 = list(map(int, input().split()))

lmax = max(l)
lsum = sum(l)

if lmax < lsum-lmax :
  print('Yes')
else :
  print('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()))
print('Yes' if 2*max(l)<sum(l) else 'No')

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

Solution (Python):
corners = int(input())
sides = list(map(int, input().split()))
re_sides = sorted(sides, reverse=True)
nums = 0
for i in range(corners-1):
    nums += re_sides[i+1]
if nums > re_sides[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):
_ = input()
cand_list = list(map(int, input().split()))
max_val = max(cand_list)
print('Yes' if sum(cand_list) > 2*max_val else 'No')

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

Solution (Python):
input()
L = list(map(int,input().split()))
max_e = max(L)
L.remove(max_e)
print('Yes' if max_e < sum(L) 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):
N=int(input())
L=list(map(int,input().split()))
L.sort(reverse=False)
if L[N-1] < sum(L[:N-1]):
    print('Yes')

else:
    print('No')

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


sum_l = sum(l)
sum_without_max = sum_l - maxi
if maxi<sum_without_max:
    print("Yes")
else:
    print("No")

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
m=max(l)
del l[l.index(m)]
s=sum(l)
if s<=m:
    print('No')
else:
    print('Yes')

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

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

L = sorted(L, reverse = True)

max = L[0]
apart_sum = 0

for i in range(1,n):
  apart_sum += L[i]
  
if max < apart_sum:
  print("Yes")
else:
  print("No")

Solution (Python):
import sys
from bisect import *
from collections import *
from copy import deepcopy
from datetime import *
from heapq import *
from itertools import *

from operator import *
from pprint import *

sys.setrecursionlimit(10**8)

input = sys.stdin.readline

def main():
    """ main """
    N = int(input())
    LS = list(map(int, input().split()))
    LS.sort()
    if LS[-1] >= sum(LS[:-1]):
        print('No')
    else:
        print('Yes')

if __name__ == '__main__':
    main()

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

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