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=(int, input().split())[1]
for i in range(N):
  L[i] = int(L[i])
a=sum(L)
b=max(L)
c=a-b
if c>b:
  print("Yes")
else:
  print("No")

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

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

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

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

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

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

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

Solution (Python):




def main():
    N = int(input())
    L = list(map(int, input().split()))
    L.sort(reverse=True)
    print('Yes'if L[0] < sum(L[1:]) else 'No')


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
*L, = 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()))
l.sort()
t=l[-1]
s=sum(l[:-1])
if s > t:
  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 = [int(x) for x in input().split()]

biggest = max(l)
l.remove(biggest)

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

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

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

if max(A) < sum(A) - 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):
def main(n: int, l: list):
    l.sort()

    m = l.pop()

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


if __name__ == "__main__":
    n = int(input())
    l = list(map(int, input().split()))

    main(n, l)

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

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

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

L_max = max(L_list)
L_sum_without_max = sum(L_list) - L_max

if L_max < L_sum_without_max : print("Yes")
else: print("No")

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

def main():
    _ = int(input())
    L = tuple(map(int, input().split()))

    sum_l = sum(L)
    for l in L:
        if 2 * l >= sum_l:
            print('No')
            break
    else:
        print('Yes')
    
if __name__ == '__main__':
    main()

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

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

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

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

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

print('Yes') if L_max < sum(L) else print('No')

Solution (Python):
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda x: [na() for _ in range(x)]
ns = lambda: stdin.readline().rstrip()
nas = lambda: stdin.readline().split()

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

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

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

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

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

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

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

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

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

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

if lmax < tot:
    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()))
ans=False
max_l=max(l)
nokori=sum(l)-max_l
if max_l<nokori:
    ans=True
print("Yes" if ans else "No")

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

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

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

sum_l = sum(l)-l[len(l)-1]

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

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

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

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

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

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

Solution (Python):


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

max_width = max(L)
residue_width_sum = sum(L)-max_width

judge = 'Yes' if max_width < residue_width_sum else 'No'

print(judge)

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

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

Solution (Python):
N = int(input())
num = list(map(int,input().split()))
err=0
for i in range(N):
  if 2*num[i]>=sum(num):
    err+=1
if err>0:
  print("No")
else:
  print("Yes")

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

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

Solution (Python):
N = int(input())
l = [int(_) for _ in 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()))
sum=0
for i in range(N):
    sum=sum+L[i]
L.sort(reverse=True)

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

Solution (Python):
n=int(input())
li=list(map(int,input().split()))
w=max(li)
li.remove(max(li))
if w<sum(li):
    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):
import sys

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
LIST = lambda: list(map(int, INPUT().split()))

sys.setrecursionlimit(10 ** 9)


def main():
    N = INT()
    L = LIST()

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


if __name__ == '__main__':
    main()

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

max_index = l.index(max(l))

sum_length = 0

for x in range(n):
	if x == max_index:
		continue
	sum_length += l[x]

print ("Yes") if sum_length > max(l) else print ("No")

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

Solution (Python):
import sys
import math
import itertools

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

l.sort(reverse=True)
max=l.pop(0)
for i in range(len(l)-1):
	l[i+1]=l[i]+l[i+1]

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

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

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

z = max(l)

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

Solution (Python):
N = int(input())
L = [int(a) for a in input().split()]
maxL = max(L)
excep = sum(L)-maxL
if maxL<excep:
    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):
n = int(input())
numlist = list(map(int,input().split()))
del numlist[n::]

numlist.sort()
maxl = numlist.pop(-1)

if maxl < sum(numlist):
    print("Yes")
else:
    print("No")

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

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

x = 0
maxside = 0
for i in range(n):
    if maxside < l[i]:
        maxside = l[i]
        x = i
del l[x]
sum = 0
for i in range(n - 1):
    sum += l[i]

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

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

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

Solution (Python):
n = int(input())
l_ls = list(map(int,input().split()))
l_ls.sort()
s_len = 0

for i in range(n-1):
    s_len += l_ls[i]

if s_len > l_ls[-1]:
    print('Yes')
else:
    print('No')

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

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

M = max(point)

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

Solution (Python):
n=int(input())
line=list(map(int,input().split()))
border=sum(line)/2
 
flag=True
for i in line:
  if i >= border:
    flag=False
    break
 
if flag:
  print('Yes')
else:
  print('No')

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


if __name__ == '__main__':
    main()

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

L.sort(reverse=True)
sum_l = 0
for i in range(1, len(L)):
    sum_l += L[i]

if L[0] < sum_l:
    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())

eList = sorted(list(map(int,input().split())),reverse = True)

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

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

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

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

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())
lengths = [int(i) for i in input().split()]


longest_index = lengths.index(max(lengths))
longest = lengths.pop(longest_index)


if longest < sum(lengths):
    print('Yes')
else :
    print('No')

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

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

Solution (Python):
"""
author : halo2halo
date : 16, Jan, 2020
"""

import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

N = int(readline())
L = list(map(int, readline().split()))
Lm=max(L)
S = sum(L)
ans = True

print('Yes' if S>2*Lm else 'No')

Solution (Python):
n, *D,  = [list(map(int, s.split())) for s in open(0)]
n, D = n[0], D[0]

D = sorted(D, reverse=True)
m = D[0]
length = 0
for i in range(1, len(D)):
    length += D[i]
if length > 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()))
if 2*max(l)>= sum(l):
  print("No")
else:
  print("Yes")

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

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

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

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

lmax = l.pop(l.index(max(l)))
if (lmax < sum(l)):
   print('Yes')
else:
   print('No')

Solution (Python):

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

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

Solution (Python):
N = int(input())
L = input().rstrip().split()

for i in range(len(L)):
  L[i] = int(L[i])
L.sort()
maxl = L[len(L)-1]
leftl = sum(L[0:len(L)-1])

if maxl < leftl:
  print("Yes")
else:
  print("No")

Solution (Python):
import sys

n, *l = map(int, sys.stdin.read().split())

def main():
    circumstance = sum(l)
    l_max = max(l)
    return 'No' if circumstance - l_max <= l_max else 'Yes'
    
if __name__ == '__main__':
    ans = main()
    print(ans)

Solution (Python):
n = int(input())
L = list(map(int,input().split()))
maxL = max(L)
sum = 0
flag = True
for l in L:
  if l == maxL and flag:
    flag = False
  else:
    sum += l
if maxL < sum:
  print("Yes")
else:
  print("No")

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

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10**9)
INF=10**18
def input():
    return sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

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

max_len = max(Ls)
Ls.remove(max_len)
if max_len < sum(Ls):
    print('Yes')
else:
    print('No')

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

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

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

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

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

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

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

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

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

l_max = l.pop(l.index(max(l)))
if l_max < sum(l):
    print("Yes")
else:
    print("No")

Solution (Python):
input_angle = int(input())
input_length = input()

_length = input_length.split(' ')
length = [int(l) for l in _length]
length.sort()
sum = 0

for i in range(input_angle-1):
  sum += int(length[i])
  
if int(length[-1]) < 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()))
sl=sorted(l)
if sl[-1]<sum(sl[:-1]):
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
L_s = str(input()).split(" ")
L = []
for l in L_s:
    L.append(int(l))

max_v = int(max(L))
L.pop(L.index(max(L)))

sum = 0
for i in L:
    sum += int(i)

if max_v < sum:
    print("Yes")
else:
    print("No")

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

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

Solution (Python):
N = int(input())
L = 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()))
mx=max(l)
if sum(l)>2*mx:
    print('Yes')
else:
    print('No')

Solution (Python):


henCount = int(input().rstrip())

henList = sorted([int(i) for i in input().rstrip().split(" ")])
henList.reverse()
long = henList[0]
subTotal = sum(henList) - long

ans = "Yes"

if long >= subTotal:
    ans = "No"
print(ans)

Solution (Python):
A = int(input())
B = list(map(int,input().split(" ")))
B.sort(reverse=True)
Max_B = B[0]
B.pop(0)
if sum(B) > Max_B:
	print("Yes")
else:
	print("No")

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

L_i = [int(s) for s in L]

Length = 0
sum = 0
num = 0

for i in range(N):
    sum += L_i[i]

    if L_i[i] > Length:
        Length = L_i[i]
        num = i


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

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

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
max_num = sorted(L)[-1]
sum_hen = sum(sorted(L)[:-1])
print('Yes' if max_num < sum_hen else '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 = input()
l = list(map(int,input().split()))
maxi = max(l)

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

Solution (Python):

n = int(input())

L = list(map(int, input().split()))
l = 0
s = sum(L)

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

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

cur_longest = 0
sum_others = 0

for l in ls:
    sum_others += l
    if l > cur_longest:
        sum_others -= l
        sum_others += cur_longest
        cur_longest = l

if cur_longest >= sum_others:
    print('No')
else:
    print('Yes')

Solution (Python):
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

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

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7


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


L = np.array(L, dtype=int)
ok =  L.max() < L.sum() - L.max()
if ok:
    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):
def p_b():
    n = int(input())
    *L, = map(int, input().split())
    print("Yes" if max(L) < sum(L) - max(L) else "No")
    
p_b()

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline
N = int(input())
li_L = list(map(int, input().split()))
a = max(li_L)
li_L.remove(a)
if a < sum(li_L):
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
S = str(input())
S = S.split()
S_list = list(S)
for i in range(len(S_list)):
    S_list[i] = int(S_list[i])

S_list.sort()
S_list.reverse()
total = 0

for i in range(len(S_list)):
    if i > 0:
        total = total + S_list[i]

if S_list[0] < total:
    print('Yes')
else:
    print('No')

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

l = sorted(l)

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

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

if sum(l) > max(l)*2:
    ans = "Yes"
else:
    ans = "No"

print(ans)

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

Lmax = max(L)
L.remove(Lmax)
LN = sum(L)

if Lmax < LN:
  print('Yes')
else:
  print('No')

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

a= [int(i) for i in input().split()]
a.sort()
if sum(a)-a[-1]>a[-1]:
  print("Yes")
else:
  print("No")

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

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

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

total=0
for i in range(n):
    total+=li[i]

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

Solution (Python):
n = int(input())
list_l = list(map(int, input().split()))
max_l = max(list_l)
list_l.remove(max_l)
if max_l < sum(list_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):
import math

input()
l = [int(i) for i in input().split()]
print("Yes" if max(l) < sum(l) - max(l) else "No")

Solution (Python):
import sys

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

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

if s - m > m:
    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, = sorted(map(int, input().split()), reverse=True)

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

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

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
Max = max(l)
Max_index = l.index(max(l))
l[Max_index] = 0
if Max < sum(l):
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
check = True
for i in range(n):
    if l[i] >= sum(l) - l[i]:
        check = False
if check:
    print("Yes")
else:
    print("No")

Solution (Python):
def examA():
    T, X = LI()
    ans = T/X
    print(ans)
    return

def examB():
    N = I()
    L = LI()
    ans = "Yes"
    if max(L)*2>=sum(L):
        ans = "No"
    print(ans)
    return

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

if __name__ == '__main__':
    examB()

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

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

Solution (Python):
N = int(input())
li = list(map(int,input().split()))
li.sort()
li.reverse()
sum = 0
for i in range(1,N) :
    sum+= li[i]
ans = "No"
if sum > li[0] :
    ans = "Yes"
print(ans)

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

Solution (Python):
N = int(input())
L = 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)-max(l)>max(l):
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
L = [int(x) for x in input().split()]
longest = max(L)
L.remove(longest)

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

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

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

ma=max(l)

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

Solution (Python):
num=int(input())
lineLength=[int(s) for s in input().split(" ")]
sortedLength=sorted(lineLength, reverse=True)
maxLength=int(sortedLength[0])
sumLength=0
for i in range(num-1):
  sumLength=sumLength+int(sortedLength[i+1])
if maxLength>=sumLength:
  print("No")
else:
  print("Yes")

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

Solution (Python):

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

MAX = max(L)
sum = sum(L) - MAX

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

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

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

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

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

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

table.sort()
sums = 0
for x in range(0, len(table) - 1):
    sums += table[x]
if max(table) < sums:
    print('Yes')
else:
    print('No')

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

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