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 slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    l = list(map(int, input().rstrip('\n').split()))
    l.sort()
    t = 0
    for i in range(len(l)-1):
        t += l[i]
    print("Yes" if t > l[-1] else "No")


if __name__ == '__main__':
    slove()

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


def main():
    N = int(input())
    L = list(map(int, input().split()))
    L.sort(reverse=True)

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


if __name__ == '__main__':
    main()

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
n=int(input())
l=list(map(int,input().split()))

ls=sorted(l)[::-1]

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

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
longest = 0
s = 0
for a in l:
  s += a
  longest = max(a, longest)
  
if longest < s - longest:
  print("Yes")
else:
  print("No")

Solution (Python):
import sys

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

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

Solution (Python):
import functools

n = int(input())
l = list(map(lambda x: int(x), input().split()))
    
longest = functools.reduce(lambda x,y: x if x > y else y, l)
sum = functools.reduce(lambda x,y: x + y, l) - longest

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

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

Solution (Python):
n = int(input())
l = list(map(int,input().split()))
sort_l = sorted(l)
a = sort_l[n-1]
b = sort_l[0:n-1]


if a >= sum(b):
  print("No")
else:
  print("Yes")

Solution (Python):
n = int(input())
l =[int(i) for i 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()
if sum(L[:-1]) > L[-1]:
    print("Yes")
else:
    print("No")

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

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

l.sort()

max_l = l.pop()

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

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

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

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

Solution (Python):
n = int(input())
leng = list(map(int, input().split()))
leng.sort()
if leng[-1] < sum(leng[0:n - 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):
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(' ')))
max_L = L.pop(L.index(max(L)))
if max_L < sum(L):
    print('Yes')
else:
    print('No')

Solution (Python):


n = input()

l = map(int, raw_input().split())


maxVal = 0
maxID = 0
for i in range(n):
    if l[i] >= maxVal:
        maxVal = l[i]
        maxID = i


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

if maxVal < sum:
    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 = 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):
input()
l=list(map(int,input().split()))
m=max(l)
print('Yes' if m*2<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())
s = input()
a = s.split(' ')
for i in range(n):
    a[i] = int(a[i])
max = 0
tot = 0
for i in range(n):
    if a[i] > max:
        max = a[i]
    tot +=a[i]
if max < tot - max: print('Yes')
else: print('No')

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

longest = max(l_list)
l_list.remove(longest)

if longest < sum(l_list):
    print("Yes")
else:
    print("No")

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
all=0
mx=0
for i in range(len(a)):
	x=int(a[i])
	if x>mx: 
		mx=x
	all=all+x
if all>2*mx : 
	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 = raw_input()
L = map(int, raw_input().strip().split())
s = sum(L)
mx = max(L)
if mx < s - mx:
  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(""))
x = list(map(int, input().split()))
if((sum(x)-max(x))>max(x)):
    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 max_l < sum(l):
    print("Yes")
else:
    print("No")

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

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

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

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

Solution (Python):
num = int(input())
list1 = [int(i) for i in input().split()]
sum1 = sum(list1)
flag = True
for x in range (num):
    if list1[x]>=(sum1-list1[x]):
        flag = False
        break

if flag == True:
    print ("Yes")
else:
    print ("No")

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

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

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

sl = sorted(l)

if sl[-1] < sum(sl[:-1]):
    print('Yes')
else:
    print('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=list(map(int, input().split()))

lmax=max(L)
lothers=sum(L)-lmax

if lmax<lothers:
  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())
array = list(map(int, input().split()))
if sum(array)-max(array) > max(array):
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())
L = sorted(map(int, input().split()))[::-1]

max_l = L[0]

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


print('Yes' if max_l < sum else 'No')

Solution (Python):
n = int(input())
*l_list, longest = sorted(map(int, input().split()))
print('Yes' if longest < sum(l_list) else '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())
p=list(map(int,input().split()))
m=max(p)
p.remove(m)

if m<sum(p):
    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())
L = list(map(int,input().split()))
L = sorted(L)
a = L.pop()
if a<sum(L):
    print("Yes")
else:
    print("No")

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

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

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

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

input()
l = list(map(int, 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_sum = sum(a for a in L)
if all((L[i] < L_sum-L[i] for i in range(n))):
  print('Yes')
else:
  print('No')

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

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

if max(data)*2 < sum(data):
  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 '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=True)
sum = 0
for i in range(1, N):
    sum += L[i]
if L[0] < sum:
    print("Yes")
else:
    print("No")

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

L.sort()

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

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

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

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

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

sum_length = 0
max_index = l.index(max(l))
for i in range(n):
    if i == max_index:
        continue
    sum_length += l[i]
if sum_length > l[max_index]:
    print("Yes")
else:
    print("No")

Solution (Python):


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

longest = max(l)

l.remove(longest)


if sum(l) > longest:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
l = list(map(int,input().split()))
s = sum(l)
ans = "Yes"
for i in range(n):
    if l[i] >= s/2:
        ans = "No"
        break
print(ans)

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

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

L.sort()
hen = L.pop(-1)

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

Solution (Python):
n = int(input())
I = list(map(int,input().split()))
I.sort(reverse = True)
count = 0
ans = I[0]
del I[0]
if ans < sum(I):
    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(x) for x in 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()))
s=sum(L)

sw=0
for i in range(N):
  if s-L[i]<=L[i]:
    sw=1
    break
print("Yes" if sw==0 else "No")

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

Solution (Python):
if __name__ == '__main__':
    N = int(input())
    L = list(map(int, input().split()))
    S = sum(L)
    flag = True
    for l in L:
        if l >= S - l:
            flag = False
    if flag:
        print('Yes')
    else:
        print('No')

Solution (Python):

n=int(input())
l=list(map(int,input().split()))
l.sort()
maxl=l.pop()
a=sum(l)
print('Yes' if maxl<a else 'No')

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

n = int(input())
l = MAP()

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

Solution (Python):
n = int(input())
l = list(map(int,input().split()))
max = 0
sum = 0
for i in range(len(l)):
    sum += l[i]
    if l[i] > max:
        max = l[i]
    
if sum - max > max:
    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):
_=input()
a= sorted(list(map(int,input().split())),reverse=True)

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

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

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

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

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

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

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


L.sort()


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

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

mx = max(ls)
sm = sum(ls)

smt = sm - mx

if smt > mx:
    print('Yes')
else:
  print('No')

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

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

ans=0
for j in range(n):
  if count>2*l[j]:
    ans+=1

if ans==n:
  print("Yes")
else:
  print("No")

Solution (Python):
n=int(input())
l=sorted(list(map(int,input().split())))
s=sum(l)
if max(l) < s-max(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("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):
def ok():
  print("Yes")
def ng():
  print("No")

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

if l[0] < sum(l[1::]):
  ok()
else:
  ng()

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

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

if sum(L[:-1]) > L[-1] :
	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):
_,a =input(),sorted(list(map(int,input().split())))
print("Yes" if sum(a[0:-1]) > a[-1] else "No")

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
a=max(L)
b=sum(L)-a
print("Yes" if b>a else "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 = sorted(list(map(int, input().split())))

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

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

Solution (Python):
import numpy as np
import sys

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)
L.remove(M)
i = 0
for j in L:
    i += j
if i > M:
    print("Yes")
else:
    print("No")

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

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

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

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

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

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

s = sorted(s)
c = s.pop(n-1)

if c < sum(s):
    print('Yes')
else:
    print('No')

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

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

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

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

print(ans)

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()))
if 2*max(L)-sum(L)<0:
    print("Yes")
else: print("No")

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

Solution (Python):
N = int(input())
L = [int(x) for x in input().split()]
L.sort()
if(L[N-1] < sum(L[0:N-1])):
  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):
input()
L = sorted(list(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()))
L.sort()
L.reverse()
if L[0] < sum(L[1:n]):
  print("Yes")
else:
  print("No")

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

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

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

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

if ans > l[n-1]:
  print('Yes')

else:
  print('No')

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

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

S = 0
for i in range(len(L)):
  S += L[i]
  
if S > M:
  print('Yes')
else:
  print('No')

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

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

l.sort()

a= l[N-1]
b = 0
for i in range (0,N-1):
	b+=l[i]

if b>a:
	print("Yes")

else:
	print("No")

Solution (Python):
"""
【ABC117】
B_Polygon



import sys


def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def IS(): return map(int, sys.stdin.readline().rstrip().split())
def II(): return int(sys.stdin.readline().rstrip())
def SS(): return sys.stdin.readline().rstrip().split()
def S(): return sys.stdin.readline().rstrip()

N = II()
lst = sorted(LI())
if lst[-1]< sum(lst[:-1]):
    print("Yes")
else:
    print("No")

Solution (Python):
n=input();l=sorted(map(int,input().split()));print("YNeos"[sum(l[:-1])<=l[-1]::2])

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

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

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

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

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

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

Solution (Python):
N = input()
lst = input().split(" ")
lst2 = []
for i in lst:
    int_i = int(i)
    
    lst2.append(int_i)

max  = max(lst2)

sum = sum(lst2)

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

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

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

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

Solution (Python):
n = int(input())
l = [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()))

L = sorted(L,reverse=True)
if L.pop(0) < sum(L):
  print("Yes")
else:
  print("No")

Solution (Python):
import sys

n = input()
lengths = list(map(int,input().split(" ")))

lengths = sorted(lengths)
max = lengths.pop(-1)
if max < sum(lengths) :
    print("Yes")
else :
    print("No")

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

L = sorted(L)
LL = L[-1]
sL = 0
for i in range(N-1):
    sL += L[i]
    
if sL > LL:
    print("Yes")
else:
    print("No")

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

if sum(li) - 2*max(li) > 0:
  print("Yes")
else: print("No")

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

Solution (Python):
n=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('Yes' if m < sum(L) - m else 'No')

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

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

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

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

dmax = max(d)

dsum = sum(d)

tan = dsum - dmax

if tan > dmax:
  print("Yes")
else:
  print("No")

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

Solution (Python):
import math

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

L.sort()

if sum(L[0:-1]) > L[-1]:
  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())
ls = list(sorted(map(int, input().split())))
if ls[-1] < sum(ls[:-1]):
    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)<sum(L)-max(L):
    print("Yes")
else:
    print("No")

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

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

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


main()

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

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

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N = INT()
L = LIST()

tmp = max(L)
L.remove(tmp)
if tmp < sum(L):
	print("Yes")
else:
	print("No")

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

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

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

l.sort()
max_num = l.pop(n - 1)
total = sum(l)
if max_num < total:
    print("Yes")
else:
    print("No")

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

Li.sort()
L_sum = sum(Li)
if Li[-1] < L_sum - Li[-1]:
    print('Yes')
else:
    print('No')

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

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

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

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

tot=0
for i in range(1,n):
  tot+=l[i]
if tot>l[0]:
  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 = sorted(list(map(int,input().split())),reverse = True)
s = 0

for i in l[1:]:
  s += i
  
if l[0] < s:
  print("Yes")
else:
  print("No")

Solution (Python):
n, *l = map(int, open(0).read().split())
l.sort()
print(['No', 'Yes'][l[-1] < sum(l[:-1])])

Solution (Python):
"""
4
3 8 5 1

Yes
"""

num = int(input())
first = list(map(int, input().split()))

max = max(first)
sum = sum(first)
if max < sum - 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 = list(map(int,input().split()))
if max(L)<sum(L)-max(L):
  print("Yes")
else:
  print("No")

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

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

L.sort(reverse=True)

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

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

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

Solution (Python):
n = int(input())
l = list(map(int,input().split()))
maxl = max(l)
l.remove(max(l))
if sum(l)>maxl:
    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=int(input())
s=list(map(int,input().split()))
a=max(s)
s.remove(a)
b=sum(s)
if b-a>0:
  print("Yes")
else:
  print("No")

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

if sum(li) > 2 * max(li):
    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 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= int(input())
L= list(map(int, input().split()))
print("YNeos"[max(L)*2>=sum(L)::2])

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=sorted(list(map(int,input().split())),reverse=True)
print('Yes' if l[0]<sum(l[1:]) else 'No')

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

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

Solution (Python):
def main():
    N = int(input())
    L = [int(l) for l in input().split()]
    tot = sum(L)
    maxl = max(L)
    if maxl < (tot - maxl):
        return "Yes"
    return "No"

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

Solution (Python):

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

L = sorted(L)

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

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

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

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

nums=map(int,input().split())

ans=sorted(nums,reverse=True)


if ans[0]<sum(ans[1:]):
    print("Yes")

else:
    print("No")

Solution (Python):
n=int(input())
l = list(map(int, input().split()))
l.sort()
sum=0
for x in l:
    sum+=x

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

Solution (Python):
n=int(input())
l = list(map(int, input().split()))
l.sort()
maxi=l[-1]
l[-1]=0
sum=0
for x in l:
    sum+=x

if sum<=maxi:
    print("No")
else:
    print("Yes")

Solution (Python):
input_a = int(input())
input_list = list(map(int, input().split()))
input_list.sort()
sum = 0
for i in range(input_a - 1):
    sum += input_list[i]

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

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