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())
Ls = list(map(int, input().split()))
max_l = max(Ls)
Ls.remove(max_l)
print('Yes' if sum([x for x in Ls]) > max_l else 'No')

Solution (Python):
a = int(input())
b = list(map(int,input().split()))
c = sorted(b,reverse=True)

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

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

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
m = 0		
s = 0		
for i in range(N):
    s += L[i]
    if m < L[i]:
        m = L[i]

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

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

Solution (Python):
n = int(input())
ls = list(map(int, input().split()))
maxNum = max(ls)
ls.pop(ls.index(maxNum))

if maxNum < sum(ls):
    print("Yes")
else:
    print("No")

Solution (Python):



n = int(input())
l = list(map(int,input().split()))
m = max(l)
mi = l.index(m)
sum = 0
for i in range(n):
    if i == mi:
        continue
    sum += l[i]
if sum > m:
    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:n])):
  print("Yes")
else:
  print("No")

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

if __name__ == '__main__':
    main()

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

Solution (Python):
input()
l=[int(i) for i in input().split()]
print(["Yes","No"][max(l)-(sum(l)-max(l))>=0])

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

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

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

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

if sum(li[:-1]) > li[-1]:
  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()))
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()))

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

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

lst1.sort(reverse=True)
sum = 0

for i in range(n-1):
    sum+= lst1[i+1]

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

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

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

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

lmax = max(L)
L.remove(lmax)
lsum = sum(L)

if lmax < lsum:
    print('Yes')
elif lmax >= lsum:
    print('No')

Solution (Python):

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



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

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

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

if mx < S-mx:
    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 len(l) < 3:
    print('No')

ma = max(l)

l.remove(ma)

if ma < sum(l):
    print("Yes")

else:
    print("No")

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

Solution (Python):




N = int(input())
L = sorted(map(int, input().split()), reverse=True)

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

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

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

longest = max(edges)
total = sum(edges) - longest

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

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

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

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

summation=sum(L)
maximum=max(L)
second=summation-maximum

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

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

line.sort(reverse=True)
lmx = line[0]
del line[0]
lsum = sum(line)

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

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

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

Solution (Python):
n = int(input())
li = map(int,input().split())
li = list(li)
li.sort()
s=0
for i in range(n-1):
  s+=li[i]
if s<=li[-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())
ls = list(map(int, input().split()))
maxl = max(ls)
ls.pop(ls.index(maxl))
if sum(ls) > maxl:
  print("Yes")
else:
  print("No")

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

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

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

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

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

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

line.sort()
total = 0
for i in line[:-1]:
    total += i
if line[-1] < total:
    print('Yes')
    sys.exit()
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 sys
sys.setrecursionlimit(100000)

def intinput(): return map(int,sys.stdin.readline().split())

n=int(input())
l=list(intinput())
l.sort()
if sum(l[:-1])>l[-1]:
    print("Yes")
else:
    print("No")

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

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

Solution (Python):
n1 = int(input())
na2  = [int(i) for i in input().split()]

n3 = max(na2)
n4 = sum(na2)

r5 = "No"
if (n4 - (2 *n3)) > 0:
    r5 = "Yes"

print(r5)

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

max = 0
l = 0
for i in range(N):
    if L[i]>max:
        max=L[i]
    l += L[i]

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

Solution (Python):
import sys

n = int(input())
length = sorted(list(map(int, input().split())))
a = sum(length[:n-1])

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

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

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

L.sort()
L.reverse()
L_max = L.pop(0)
if L_max < sum(L):
    print('Yes')
else:
    print('No')

Solution (Python):
_ = int(input())
L = sorted(list(map(int, input().split())))
print('NYoe s'[max(L)<sum(L)-max(L)::2])

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(reverse=True)
print(('Yes','No')[L[0]>=sum(L[1:])])

Solution (Python):
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

N = n()
Ls = nl()

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

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

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



Max = max(List)
Sum = sum(List)

if(Max < Sum - Max):
    print('Yes')
else:
    print('No')

Solution (Python):
'''
allinputs = iter(input().splitlines())
input = lambda : next(allinputs)

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

L.sort()
sum = 0

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

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

llist.sort()
if llist[-1]<sum(llist[0:-1]):
  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 = input()
l_list = [int(i) for i in input().split()]

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

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

M = max(List)
List.remove(M)

if M<sum(List):
    print("Yes")
else:
    print("No")

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

Solution (Python):
N=int(input())
L=input().split()
S=M=0
for i in range(N):
    L[i]=int(L[i])
    if L[i]>M:
        M=L[i]
    S+=+L[i]
if S>2*M:
    print("Yes")
else:
    print("No")

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

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

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

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

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

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

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

Solution (Python):
import sys
n= int(input())
a = list(map(int, input().split()))
a.sort()
sum=0
for i in range(n-1):
  sum=sum+a[i]
if sum>a[n-1]:
  print('Yes')
  sys.exit()
print('No')

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

ml = max(lst)
sl = sum(lst) - ml

if ml < sl:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
L = [int(x) for x in input().split()]
max_L = max(L)
idx_max_L = L.index(max_L)
rest_sum_L = 0
for i in range(N):
  if i != idx_max_L:
    rest_sum_L += L[i]
 
if rest_sum_L > max_L:
  print("Yes")
else:
  print("No")

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

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

Solution (Python):
def abc():
    input()
    sides = sorted(map(int, input().rstrip().split()))
    max_sides = sides.pop(-1)
    if max_sides < sum(sides):
        print('Yes')
    else:
        print('No')


abc()

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

lmax = max(ln)
lsum = sum(ln)

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

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

mlen = max(L)
slen = sum(L)

if (slen - mlen) <= mlen:
  print("No")
else:
  print("Yes")

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
l.sort(reverse=True)
long = l[0]
others = sum(l) - long
if long < others:
    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()))
l.sort()
sum = 0
for i in range(n-1):
	sum += l[i]
if sum > l[n-1]:
	print('Yes')
else:
	print('No')

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

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

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

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

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

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

s = sum(l)

for i in l:
    if i >= s - i:
        print('No')
        break
else:
    print('Yes')

Solution (Python):
n = int(input())
l = sorted(list(map(int, input().split())),reverse=True)
maxNum = l[0]
sumNum = sum(l[1:])

if maxNum < sumNum:
    print("Yes")
else:
    print("No")

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

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

s = sum(A)
a = max(A)

answer = 'No' if a >= s-a else 'Yes'
print(answer)

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

maxL = max(L)
total = sum(L)
exceptLongest = total - maxL

if maxL < exceptLongest:
    print("Yes")
else:
    print("No")

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

maxL = max(L)
total = sum(L)
exceptLongest = total - maxL

if maxL < exceptLongest:
    print("Yes")
else:
    print("No")

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

L = sorted(map(int,input().split(" ")),reverse=True)



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

print(judge)

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

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

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

M = max(L)

if M < sum(L)/2:
  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())
a=list(map(int,input().split()))
a.sort()
if sum(a[:n-1])>a[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):
lst = []
N = int(input())
lst = list(map(int, input().split()))

max = max(lst)
lst.remove(max)

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

Solution (Python):
n=input()
inp=list(map(int,input().split()))
inp.sort()
inp.reverse()
l=sum(inp[1:])
if inp[0]<l:
    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())
l=[int(x) for x in input().split()]
sum_l=sum(l)
def solve():
    for li in l:
        if li*2>=sum_l:
            return False
    return True
if solve():
    print("Yes")
else:
    print("No")

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

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

L.sort()

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

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

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

Solution (Python):
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")


N = int(sys.stdin.readline())
L = list(map(int, sys.stdin.readline().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)-L[0]:
    print('Yes')
else:
    print('No')

Solution (Python):
import sys

input = sys.stdin.readline

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

L.sort()
longest = L.pop()

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

Solution (Python):


import sys


s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in ss]
ss2nnn = lambda ss: [s2nn(s) for s in ss]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline().rstrip() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    N = i2n()
    L = i2nn()
    L.sort()
    l1 = sum(L[:-1])
    l2 = L[-1]
    if l1 > l2:
        print('Yes')
    else:
        print('No')

main()

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

if max(edges) * 2 < sum(edges):  
  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()))

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

if sum(L) > max_length:
    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):
n  = int(input())
li = list(map(int,input().split()))

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

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

sL = sorted(L,reverse=True)
sum = 0
for i in range(1,len(sL)):
    sum += sL[i]

if sL[0] < sum:
    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):
N = int(input())
L = list(map(int, input().split(" ")))

L.sort()

maxL = max(L)

sumL = sum(L[0:-1])

if maxL < sumL:
    print("Yes")
else:
    print("No")

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

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

if l_sum - l_max > l_max:
    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):
nums = int(input())
input_list = [int(x) for x in input().split()]
input_list.sort(reverse=True)
max_num = input_list.pop(0)
if max_num < sum(input_list):
    print("Yes")
else:
    print("No")

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

s = sum(L)
m = max(L)

if s - m > m:
    print('Yes')
else:
    print('No')

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

Solution (Python):
def p(a):
    print(a)

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

p("Yes" if l[0]<sum(l)-l[0] else "No")

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

m = max(l)
d = sum(l)-m

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

Solution (Python):
N = int(input())
L = [int(s) for s in input().split(" ")]
max_L = 0
sum_L = 0
for l in L:
  if l > max_L:
    max_L = l
  sum_L += l
 
if sum_L - max_L > max_L:
  print("Yes")
else:
  print("No")

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

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

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

a.sort(reverse=True)
if a[0] < sum(a[1:]):
    print("Yes")
else:
    print("No")

Solution (Python):
_ = input()
ls = list(map(int, input().split()))
maxlen = max(ls)
ls.remove(maxlen)
print("Yes" if sum(ls)>maxlen else "No")

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

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

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

for i in L:
    sum += i

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

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

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

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

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

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

Solution (Python):
n=int(input())
l=sorted([int(i) for i in 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 = list(map(int, input().split()))
s = 0

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

Solution (Python):
n=int(input())
lst=list(map(int,input().split()))
mx,i=max(lst),lst.index(max(lst))
lst.pop(i)
if sum(lst)>mx:
    print('Yes')
else:
    print('No')

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

    maxv = max(l)
    maxi = l.index(maxv)

    print('Yes') if maxv < sum(l[:maxi] + l[maxi+1:]) 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()))
M=max(L)
ans=0
L.remove(int(M))
for i in L:
  ans=ans+i

if ans > M:
  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()))
print("Yes" if max(l) < sum(l) - max(l) else "No")

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

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

Solution (Python):
N = int(input())
li = list(map(int, input().split()))
s = sum(li)
m = max(li)

if (s - m) > m:
	print('Yes')
else:
	print('No')

Solution (Python):
from functools import reduce
from operator import add

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

lst.sort()
m = lst.pop()
s = reduce(add,lst)
if m < s:
  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()))

L.sort()

lower = sum(L) - L[-1]

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

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

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

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

dekai = max(l)
l.remove(max(l))
lst_sum = sum(l)

if dekai < lst_sum:
    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[n-1] < sum:
        print('Yes')
else:
        print('No')

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

num_list = [ int(v) for v in input().split() ]
max_length = max(num_list)
if max_length*2 >= sum(num_list):
  print("No")
else:
  print("Yes")

Solution (Python):
from sys import stdin
import numpy as np
N = int(stdin.readline().rstrip())
L = np.array([int(x) for x in stdin.readline().rstrip().split()])
LS = np.sort(L)[::-1]
if LS[0] < np.sum(LS[1:]):
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())
L_list = [int(e) for e in input().split()]

L_list.sort(reverse=True)

Longest_L=L_list[0]
all_L=0
for i in range(1,N):
  all_L+=L_list[i]
  
if all_L>Longest_L:
  print("Yes")
else:
  print("No")

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

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
L.sort(reverse=True)
most = L.pop(0)
_v = 0
for v in L:
    _v += v
if most < _v:
    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()))
ma=max(l)
print("Yes" if sum(l)>2*ma else "No")

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
ma=0
su=0
for i in range(n):
  if l[i]>ma :
    ma=l[i]
  su+=l[i]

print("Yes" if su-ma>ma else "No")

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

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

max = 0
maxidx = 0
sum = 0
for i in range(N):
    sum += L[i]
    if L[i] > max:
        max = L[i]
        maxidx = [i]

sum -= max

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

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

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

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

Solution (Python):
from sys import stdin


def main():
    _ = int(input())
    l_lst = [int(x) for x in stdin.readline().split()]
    l_lst.sort(reverse=True)
    if l_lst[0] < sum(l_lst)-l_lst[0]:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

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

Solution (Python):
import numpy as np



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




L = np.array(L)
Max_L = max(L)

if Max_L < sum(L) - Max_L:
    print("Yes")

else:
    print("No")

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

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

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

l_max = max(l_list)
l_list.remove(l_max)
l_sum = sum(l_list)

if(l_max < l_sum):
    print('Yes')
else:
    print('No')

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

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

lst = []
for i in map(int, input().split()):
    lst.append(i)

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

Solution (Python):
def sub():
    N = int(input())
    Ls = [int(e) for e in input().split()]
    Ls = sorted(Ls)
    a = sum(Ls[:-1])
    b = Ls[-1]
    if b < a:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    sub()

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

hen_len_lst = input().split() 

hen_len_sum = 0 

ans_flg = "Yes" 

for n in range(N):
    hen_len_sum += int(hen_len_lst[n])

for n in range(N):
    if int(hen_len_lst[n]) >= (hen_len_sum - int(hen_len_lst[n])):
        ans_flg = "No"

print(ans_flg)

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

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

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


total = 0
for i in l:
    total = total + i

if long < total:
    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()))
L.sort()
if sum(L) - L[-1] > L[-1]:
    print('Yes')
else:
    print('No')

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

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

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

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