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())
a = list(map(int, input().split()))
a.sort()
ans = 0
for i in range(n -1):
    ans += a[i]
print("Yes" if  a[-1] < ans else "No")

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

Solution (Python):
import numpy as np

N = int(input().rstrip())
L = [int(i) for i in input().rstrip().split()]
L.sort(reverse = True)

L = np.array(L)
x = L[0]
y = np.sum(L)-L[0]

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

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

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

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

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

max_length = max(L)

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

Solution (Python):
N = int(input())
length = list(map(int,input().split()))
if max(length)*2 < sum(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 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(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()
if (l[-1] < sum(l[0:-1])):
    print("Yes")
else:
    print("No")

Solution (Python):
if __name__ == '__main__':

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

	max_n = max(A)

	if max_n < sum(A) - max_n:
		print("Yes")
	else:
		print("No")

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

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

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

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

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

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

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

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

s = sum(l)
m = max(l)

if m<s-m:
    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)]
ii2sss = lambda n: [list(sys.stdin.readline().rstrip()) for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))
from collections import deque  
from collections import defaultdict  
from heapq import heapify, heappush, heappop, heappushpop  
from bisect import bisect_left, bisect_right  
sys.setrecursionlimit(int(1e+6))
MOD = int(1e+9) + 7



def main():
    N = i2n()
    L = i2nn()
    lsum = 0
    lmax = 0
    for l in L:
        lsum += l
        if lmax < l:
            lmax = l
    if lsum - lmax > lmax:
        print('Yes')
    else:
        print('No')

main()

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

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

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

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

total=sum(length)
semi_total=total-long
if semi_total>long:
    print('Yes')
else:
    print('No')

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

print("Yes") if L[-1] < sum(L[:-1]) 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


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


def main():
    n = ni()
    L = nl()
    l = max(L)
    L.remove(l)
    if l < sum(L):
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

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

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

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
l_max = max(l)
sum_l = sum(l) - l_max

if l_max < sum_l:
    print("Yes")
else:
    print("No")

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

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

Solution (Python):
n = int(input())
l = sorted([int(x) for x in input().split()], 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)
s=sum(l)
print("Yes" if s-m>m else "No")

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

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

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

a=max(L)
sum=sum(L)

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

Solution (Python):

import sys

def main():
    input = sys.stdin.readline
    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())
L = list(map(int, input().split()))
L.sort()
if L[-1] < (sum(L) - L[-1]):
    print("Yes")
else:
    print("No")

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

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

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

Solution (Python):
input();a=list(map(int,input().split()));print(['No','Yes'][max(a)<(sum(a)-max(a))])

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

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

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

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

Solution (Python):
def resolve():
    input()
    L = list(map(int, input().split()))
    M = max(L)
    R = sum(L) - M
    if R > M:
        print('Yes')
    else:
        print('No')
resolve()

Solution (Python):
N = int(input())
SS = input().split()
list1 = [int(i) for i in SS]
list1.sort(reverse = True)
total = 0
maxi = list1.pop(0)
for i in list1:
  total +=i

if total > maxi :
  print('Yes')
else:
  print('No')

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

Solution (Python):
N = int(input())
L = input().split()
flag = 0
total = 0

for i in range(N):
  L[i] = int(L[i])
  total += L[i]

for i in range(N):
  if L[i]*2 >= total:
    print("No")
    flag = 1
    break

if flag == 0:
  print("Yes")

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




















































def calculation(lines):
    N = lines[0]
    
    values = list(map(int, lines[1].split()))
    
    
    

    ma = max(values)
    su = sum(values)

    if ma * 2 < su:
        result = 'Yes'
    else:
        result = 'No'

    return [result]



def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['4', '3 8 5 1']
        lines_export = ['Yes']
    if pattern == 2:
        lines_input = ['4', '3 8 4 1']
        lines_export = ['No']
    if pattern == 3:
        lines_input = ['10', '1 8 10 5 8 12 34 100 11 3']
        lines_export = ['No']
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    if len(args) == 1:
        mode = 0
    else:
        mode = int(args[1])
    return mode



def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(2)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    
    
    
    
    
    
    
    
    
    
    



if __name__ == '__main__':
    main()

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

Solution (Python):

n = int(input())
l = list(map(int, input().split()))
lmax = max(l)
l.sort(reverse=True)
if lmax < sum(l[1:]):
    print("Yes")
else:
    print("No")

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

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

print(['No','Yes'][sl[-1]<sum(sl[:-1])])

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

ls.sort(reverse=True)
max1 = ls.pop(0)
if max1 < sum(ls):
    print('Yes')
else:
    print('No')

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

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

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

Solution (Python):
s = int(input())
lst = list(map(int,input().split()))
lst.sort()

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

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

def main():
    n = int(input())
    l = list(map(int, input().split()))
    l.sort(reverse=True)
    if l.pop(0) < sum(l):
        print('Yes')
    else:
        print('No')
        
if __name__ == '__main__':
    main()

Solution (Python):
s = int(input())
lst = list(map(int,input().split()))
lst.sort()

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

Solution (Python):
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for _ in range(N)]
def dp2(ini, i, j): return [[ini]*i for _ in range(j)]





N = ii()
A = sorted(li())

if A[-1] < sum(A[:N-1]):
    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):
import math
def main():
  n = int(input())
  l = list(map(int,input().split()))
  sum=l[0]
  max=l[0]
  for i in range(1,n):
    sum+=l[i]
    if l[i]>max:
      max=l[i]
  sum-=max
  if sum>max:
    print("Yes")
  else:
    print("No")
main()

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

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

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline

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

ma = max(ll)
s = sum(ll) - ma

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

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

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

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

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

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

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

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

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

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

Solution (Python):
N=int(input())
l=list(map(int,input().split()))
l.sort(reverse=True)
total=0
for i in range(1,N):
  total+=l[i]
if l[0]<total:
  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):
out=["No","Yes"]
n=int(input())
li=list(map(int,input().split()))
print(out[max(li)*2<sum(li)])

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

Solution (Python):





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

    L = sorted(L, reverse=True)

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


print(main())

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

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

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

Solution (Python):
import sys
N = int(input())
array = list(map(int,input().split()))
if not (3 <= N <= 10): sys.exit()
if not (min(array) >= 1 and max(array) <= 100): sys.exit()

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

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

l.sort()
cnt = 0
for i in range(n-1):
	cnt += l[i]
if cnt > l[n-1]:
	print("Yes")
else:
	print("No")

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

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

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

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):
import sys
input = sys.stdin.readline
n=int(input())
l=sorted(list(map(int,input().split())))
print('Yes' if sum(l[:-1])>l[-1] else 'No')

Solution (Python):
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

_ = ri()
a = sorted(rl())
if sum(a[:-1]) > a[-1]:
  print('Yes')
else:
  print('No')

Solution (Python):
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.sort()
if l[-1]<sum(l[:-1]):
  print('Yes')
  
else:
  print('No')

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


if __name__ == '__main__':
    main()

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

Solution (Python):
n = raw_input()
ais = map(int, raw_input().split(' '))
print 'Yes' if sum(ais)>2*max(ais) else 'No'

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

l.sort()
l.reverse()
if l[0] < sum(l[1:]):
    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 L[-1] >=sum(L[:N-1]):
    print("No")
else:
    print("Yes")

Solution (Python):
_,*l=map(int,open(0).read().split())
l.sort()
print("YNeos"[sum(l[:-1])<=l[-1]::2])

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

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

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

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

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

Solution (Python):
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
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 S(): return input()
def LS(): return input().split()


n = I()
l = LI()
max_l = max(l)
max_i = l.index(max(l))
l.pop(max_i)
if max_l < sum(l):
    print('Yes')
else:
    print('No')

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

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

for x in range(1,n):
  hen += l[x]

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

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

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

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
N = I()
L = LI()
x = max(L)
L.sort()
L[-1] = 0
y = sum(L)
if x < y:
    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):
import sys
read = sys.stdin.read
readline = sys.stdin.buffer.readline
INF = float('inf')


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

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

if __name__ == '__main__':
    main()

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

Solution (Python):
import sys
from collections import deque,Counter
import numpy as np
import math
sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())

def Main():
    n = I()
    l = list(IL())
    m = max(l)
    s = sum(l)-m
    if m<s:
        print('Yes')
    else:
        print('No')
    return

if __name__=='__main__':
    Main()

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

M = max(L)
S = sum(L) - M

print('Yes' if M < S else 'No')

Solution (Python):
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):
import sys
import itertools

import time
import math
import heapq
 
sys.setrecursionlimit(10 ** 7)
 
from collections import defaultdict
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines




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

mx = L[0]
idx = 0
for i in range(N):
    if L[i] > mx:
        mx = L[i]
        idx = i

if mx < sum(L[i] for i in range(N) if i != idx):
    print("Yes")
else:
    print("No")

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


if __name__ == '__main__':
    solve()

Solution (Python):


import math



from collections import deque
from collections import Counter




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

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

L=sorted(L)
c=0
for i in range(N-1):
  c+=L[i]
if L[N-1]<c:
  print('Yes')
else:print('No')

Solution (Python):
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_s = list(sorted(l))
print( 'Yes' if (l_s[-1] < sum(l_s[:-1])) else 'No')

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

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

m = max(ls)
s = sum(ls)

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

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

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

a1 = sorted(a)
if((sum(a1)-a1[-1]) > a1[-1]):
    print("Yes")
else:
    print("No")

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

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

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

ls.sort(reverse=True)

if (ls[0] < sum(ls[1:n])):
  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):
n = int(input())
a = list(map(int,input().split()))
a = sorted(a)

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

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

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

max_L = max(L)
max_i = L.index(max(L))

sum_without_max = sum([*L[:max_i], *L[max_i+1:]])

if sum_without_max > max_L:
    print("Yes")
else:
    print("No")

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

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

m = max(L)

d = sum(L)-m

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

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

max_input=max(input_list)
Sum_input=sum(input_list)-max_input
if max_input<Sum_input:
    print("Yes")
else:
    print("No")

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

M = max(A)
S = sum(A) - M

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

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

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

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

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
m=max(l)
print('Yes' if sum(l)-m>m 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_s = sorted(l, reverse=True)



longest = l_s.pop(0)




if longest < sum(l_s):
    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()))
a=sum(L)
flag=True
for i in range(N):
  if a<=2*L[i]:
    flag=False
    break
if flag:
  print('Yes')
else:
  print('No')

Solution (Python):
input()
a, *b = sorted(map(int, input().split()), reverse=True)
print('Yes' if a < sum(b) 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 = list(map(int,input().split()))

L = sorted(L,reverse=True)


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

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

def check(l):
    return 'Yes' if max(l) < sum(l) - max(l) else 'No'

print(check(l))

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

if sum(l_list) - 2* max(l_list) > 0:
    print('Yes')
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()) )

a = max(l)
b = sum(l) - a

print('Yes' if a < b else 'No')

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
tot = sum(l)
flag = True
for l_i in l:
  if 2 * l_i >= tot:
    flag = False
    break
if flag:
  print('Yes')
else:
  print('No')

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