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

Solution (Python):



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

descending_L = sorted(L, reverse=True)


other_side = sum(descending_L[1:])

if descending_L[0] < other_side:
    print('Yes')
else:
    print('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()))
mx = L.pop(L.index(max(L)))
if mx < sum(L):
    print("Yes")
else:
    print("No")
pass

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

terms = (max(l) < (sum(l) - max(l)))

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

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

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


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

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


if __name__ == '__main__':
    main()

Solution (Python):

N = int(input())
my_list = list(map(int, (input().split(maxsplit=N))))

sorted_list = sorted(my_list, reverse=True)

num = 0
for i in range(1, len(my_list)):
    num += sorted_list[i]

if sorted_list[0] < num:
    answer = 'Yes'
else:
    answer = 'No'

print(answer)

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

max = 0
kei = 0

for i in range(len(data)):
    kei += data[i]
    if max < data[i]:
        max = data[i]

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

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

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

theory = (max(L) < (sum(L) - max(L)))

if theory:
    print("Yes")
else:
    print("No")

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

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

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

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

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

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

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

if L[-1] < sum(L[0:N-1]):
    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()))
sum=0
for i in range(n):
  sum+=l[i]
print("Yes" if max(l)*2<sum 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):
import sys
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 + 7

n = I()
l = LI()

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

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

for i in range(N):
    sum = sum + l[i]
    
if max >= sum - max:
    print("No")
else:
    print("Yes")

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

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

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

max = max(l)
sum = 0


for i in range(N):
    sum = sum + l[i]
    
if max >= sum - max:
    print("No")
else:
    print("Yes")

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

for i in range(N):
    sum = sum + l[i]
    
for j in range(N):
    if sum - l[j] <= l[j]:
        flg = False
        break
            
if flg == True:
    print("Yes")
else:
    print("No")

Solution (Python):
N = input()
num = list(map(int, input().split(' ')))
max_num = max(num)
num.remove(max_num)
num_sum = 0
for i in num:
    num_sum += i
if max_num < num_sum:
    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.sort()
if l[-1]<sum(l[:-1]):
    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()))

ans = 0
for i in range(N):
	ans += L[i]
if max(L) < sum(L)-max(L):
	print("Yes")
else:
	print("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())) 

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

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

if max(i) < sum(i) - max(i):
    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):
n=int(input())
l=list(map(int,input().split()))
l.sort()

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

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

Solution (Python):

S_list = [input() for i in range(2)]
N = map(int,S_list[0].split())    
L_list = list(map(int,S_list[1].split()))
 
if sum(L_list) > max(L_list) * 2:
    result ="Yes"
else:
    result ="No"
print(result)

Solution (Python):

S_list = [input() for i in range(2)]
N = map(int,S_list[0].split())    
L_list = list(map(int,S_list[1].split()))

L_max = max(L_list)
L_sum = sum(L_list) - L_max
if L_sum - L_max > 0:
    result ="Yes"
else:
    result ="No"
print(result)

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

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

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

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

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

Solution (Python):
input()
L = list(map(int, input().split()))
print(('No', 'Yes')[sum(L) > max(L) * 2])

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

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

def answer(n: int, l: list) -> str:
    if max(l) < (sum(l) - max(l)):
        return 'Yes'
    else:
        return 'No'

print(answer(n, l))

Solution (Python):
def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


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


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

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

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

al_max = max(al)
al_sum = sum(al)

if al_sum - al_max *2 >0:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
long = list(map(int,input().split()))
one = max(long)
ans = sum(long) - one

if ans > one :
  print("Yes")
else:
  print("No")

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

x=sum(L)
for l in L:
    if l>=x-l:
        print("No")
        break
else:
    print("Yes")

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

Solution (Python):
n = int(input())
list01 = input().split()
list02 = sorted([int(s) for s in list01])
a = sum(list02) - list02[-1]
if list02[-1] < a:
    print('Yes')
else:
    print('No')

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




short_len = sum(len) - max(len)
result = 'Yes' if short_len > max(len) else 'No'
print(result)

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

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

length = sum(L)-max(L)
if max(L) < length:
    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()))
l.sort()
tmp = 0
for i in range(n-1):
    tmp += l[i]

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

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

Notmax_widths = sum(widths) - max(widths)
result = 'Yes' if Notmax_widths > max(widths) else 'No'
print(result)

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):
    answer = 'Yes'
else:
    answer = 'No'
print(answer)

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):
def main():
    n = int(input())
    l = list(map(int, input().split()))

    max_l = max(l)
    l.remove(max_l)

    sum_exc_l = sum(l)

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


if __name__ == "__main__":
    main()

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

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

Solution (Python):


def atc_117b(N: int, Li_input: str) -> str:
    Li = [int(i) for i in Li_input.split(" ")]
    Li = sorted(Li)
    max_length = Li.pop()
    if max_length < sum(Li):
        return "Yes"
    return "No"

N_input_value = int(input())
Li_input_value = input()
print(atc_117b(N_input_value, Li_input_value))

Solution (Python):

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


most_l = max(length)
othersum = sum(length) - most_l
if othersum > most_l:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
L = list(map(int,input().split()))
a = max(L)
L.remove(a)
s = 0
for i in L:
    s += i

if a < s:
    print('Yes')
else:
    print('No')

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

length = 0

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

length -= max(L)

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

Solution (Python):
u = input()
length = list(input().split())
h = [int(i) for i in length]

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

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

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

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

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

num_list.sort(reverse=True)
max_num = num_list.pop(0)

sum_left_num = 0

for i in num_list:
    sum_left_num += i

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

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

Solution (Python):
def answer(n: int, l: []) -> str:
    return 'Yes' if l.pop(l.index(max(l))) < sum(l) else 'No'


def main():
    n = int(input())
    l = list(map(int, input().split()))
    print(answer(n, l))


if __name__ == '__main__':
    main()

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

if '__main__' == __name__:
    resolve()

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)
L.remove(l)
if l < sum(L):
    print("Yes")
else:
    print("No")

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

Solution (Python):


N = int(input())
l = [int(i) for i in input().split()]
ans = 'No'


ma = max(l)
su = sum(l) - ma

if su > ma:
    ans ='Yes'
print(ans)

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

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

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


if __name__ == '__main__':
    main()

Solution (Python):


import sys

def main():
    input = sys.stdin.readline
    n = input()
    l = list(map(int, input().split()))
    max_l = max(l)
    l.remove(max_l)
    sum_l = sum(l)
    if max_l < sum_l:
        print("Yes")
    else:
        print("No")
    return


if __name__ == '__main__':
    main()

Solution (Python):
def main():
    N = int(input())
    L = list(map(int,input().split()))
    for i in range(N):
        sum = 0
        for j in range(N):
            sum += L[j]
        sum = sum - L[i]
        if sum <= L[i]:
            return ('No')
    return ('Yes')

print(main())

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

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

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

Solution (Python):
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  


N = I()
L = LI()
s = sum(L)
m = max(L)
print('Yes' if m < s-m else 'No')

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

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

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
sl=sum(l)
flag=True
for i in l:
  if sl-i <= i:
    flag=False
    break
if flag:
  print("Yes")
else:
  print("No")

Solution (Python):
import sys

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

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

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

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

e_max = max(a)

p = sum(a)-e_max

if e_max < p:
    print('Yes')
else:
    print('No')

Solution (Python):
import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  
def LS2(): return list(sys.stdin.readline().rstrip())  


N = I()
L = LI()
print('Yes' if max(L) < sum(L)-max(L) else 'No')

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

Solution (Python):
n=int(input())
L=list(map(int, input().split()))
L.sort(reverse=True)
maxL=L.pop(0)
if maxL< sum(L):
    print('Yes')
else:
    print('No')

Solution (Python):
N = int (input ())
l = [int(x) for x in input ().split ()]
m = max (l)
s = sum (l)
if m*2 < s:
  print ('Yes')
else:
  print ('No')

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

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

max_length = L[-1]
sum_length = sum(L[0:len(L)-1])

print("Yes") if max_length < sum_length else print("No")

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

L.sort()

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

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

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


if __name__ == '__main__':
    main()

Solution (Python):

def main():
    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')

if __name__ == '__main__':
    main()

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

m = max(r)
r.pop(r.index(max(r)))

if sum(r) > m:
  print('Yes')
else:
  print('No')

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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

    first = max(L)
    second = sum(L) - max(L)

    if first < second:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

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

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

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

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

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

    sum_l = sum(l_list)
    max_l = max(l_list)

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


if __name__ == "__main__":
    main()

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


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter  
from itertools import combinations as comb  
from itertools import permutations as permutate
from bisect import bisect_left as bl



from bisect import bisect_right as br
from bisect import bisect







BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None


    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)





from types import GeneratorType


def iterative(f, stack=[]):
    def wrapped_func(*args, **kwargs):
        if stack: return f(*args, **kwargs)
        to = f(*args, **kwargs)
        while True:
            if type(to) is GeneratorType:
                stack.append(to)
                to = next(to)
                continue
            stack.pop()
            if not stack: break
            to = stack[-1].send(to)
        return to

    return wrapped_func







mod = 1000000007


def inp(): return sys.stdin.readline().rstrip("\r\n")  

def out(var): sys.stdout.write(str(var))  

def lis(): return list(map(int, inp().split()))

def stringlis(): return list(map(str, inp().split()))

def sep(): return map(int, inp().split())

def strsep(): return map(str, inp().split())


def zerolist(n): return [0] * n

def nextline(): out("\n")  

def testcase(t):
    for p in range(t):
        solve()

def printlist(a):
    for p in range(0, len(a)):
        out(str(a[p]) + ' ')


def solve():
    n=int(inp())
    ar=lis()
    ar.sort()
    if 2*ar[-1]<sum(ar):
        print("Yes")
    else:
        print("No")
    
    
    
solve()

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

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

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

Solution (Python):


num = int(input())
total = 0
number = input().split(" ")
table = list(number)
x = [int(i) for i in table]
list.sort(x, reverse=True)
max = x[0]
for i in range(1, num):
    total += x[i]

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

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

Lmax = max(L)
Lsum = sum(L) - Lmax

if Lmax < Lsum:
    ans = "Yes"
else:
    ans = "No"

print(ans)

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

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

Solution (Python):
N = int(input())
L = list(map(int,input().split()))
maxL = max(L)
sumL = sum(L) - maxL
print('Yes' if maxL < sumL 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,*l=map(int,open(0).read().split())
sum_n=sum(l)
for i in range(n):
	if 2*l[i]>=sum_n:
		print('No')
		import sys
		sys.exit()
print('Yes')

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

saidai = max(l)
hoka = sum(l) - max(l)

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

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

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

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

Solution (Python):
from sys import stdin
readline = stdin.buffer.readline

def main():
    N = int(readline().rstrip())
    L = list(map(int, readline().rstrip().split()))
    if max(L) < (sum(L) - max(L)):
        print('Yes')
    else:
        print('No')

if __name__ == "__main__":
    main()

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

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
l.sort()
if(l[-1]<sum(l[:n-1])):
    print("Yes")
else:
    print("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):
def readinput():
    n=int(input())
    l=list(map(int,input().split()))
    return n,l

def main(n,l):
    lmax=max(l)
    if lmax*2<sum(l):
        return 'Yes'
    else:
        return 'No'

if __name__=='__main__':
    n,l=readinput()
    ans=main(n,l)
    print(ans)

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

s=sum(a)
if max(a)<s-max(a):
  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 = sorted(l, 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):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    N = I()
    L = LI()
    m = max(L)
    other = sum(L) - m
    if m < other:
        print("Yes")
    else:
        print("No")

main()

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

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

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

Solution (Python):
import sys
lines = [s.rstrip("\n") for s in sys.stdin.readlines()]
n, = [int(num) for num in lines.pop(0).split(" ")]
l_list = [int(num) for num in lines.pop(0).split(" ")]
l_list.sort(reverse=True)
m = l_list.pop(0)
if m < sum(l_list):
    print("Yes")
else:
    print("No")

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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

    s = sum(L)
    ok = True
    for l in L:
        if l >= s - l:
            ok = False
            break

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

    return


if __name__ == '__main__':
    main()

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

max_L = max(L)
sum_L = sum(L)

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

Solution (Python):
n = 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')