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):
from functools import reduce
from operator import add

n = int(input())

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

sl = sorted(l, reverse=True)

sum_length = reduce(add, sl[1:])

if sl[0] < sum_length:
    print('Yes')
else:
    print('No')

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

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

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

Solution (Python):
N = int(input())
L = [int(i) for i in input().split()]
L.sort()
max_edge = L[-1]
total_length = 0
for i in L[:-1]:
    total_length += i

if max_edge < total_length:
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
L.sort()
L.reverse()
Lmax = L.pop(0)
if Lmax < sum(L):
    print("Yes")
else:
    print("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()))

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

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

max_length = max(length)

length.remove(max_length)

sum_other_length = sum(length)

if sum_other_length > max_length:
    print("Yes")
else:
    print("No")

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

import numpy as np
N = int(input())
li = list(map(int, input().split()))
li.sort(reverse=True)

arr = np.array(li)
if np.sum(arr) - arr[0] > arr[0]:
    print("Yes")
else:
    print("No")

Solution (Python):

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

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

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

Solution (Python):

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

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

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

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

Solution (Python):
import sys
N = int(input())
A = [int(n) for n in input().split()]
maxA = max(A)
if(sum(A) - 2*maxA >0):
    print("Yes")
else:
    print("No")

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

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

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

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

Solution (Python):
a  = int(input())
A = []
B = list(input().split())
for i in B:
    n = int(i)
    A.append(n)
ma = max(A)

su = sum(A)
if(ma < su - ma):
    print('Yes')
else:
    print('No')

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

l = max(lines)
lines.remove(l)

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

Solution (Python):
from sys import stdin


class Main:

    @staticmethod
    def main():
        n = stdin.readline()
        ls = [int(x) for x in stdin.readline().strip().split()]
        ls.sort(reverse=True)
        if ls[0] < sum(ls[1:]):
            print('Yes')
        else:
            print('No')


if __name__ == '__main__':
    Main.main()

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

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

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

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

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

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

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

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

Solution (Python):


n = 2
e = [[int(i) for i in input().split()] for i in range(n)]

e[1].sort(reverse=True)

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

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

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

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

if __name__ == "__main__":
	main()

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):
s1=input()
s2=input().split()
n2=[int(i) for i in s2]
a=sorted(n2,reverse=True)

max=a[0]
cnt=a[1:]
all=sum(cnt)

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

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

Solution (Python):

N = int(input())

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


largestL = 0
largestIndex = 0


for i in range(N):
  if Ls[i] > largestL:
    largestL = Ls[i]
    largestIndex = i

sumOfSmallLs = 0
for i in range(N):
  if i != largestIndex:
    sumOfSmallLs += Ls[i]

if sumOfSmallLs > largestL:
  print('Yes')
else:
  print('No')

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

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

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

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

flg = 0
for l in L:
  if not sum(L)-l > l:
    print('No')
    flg = 1

if not flg: print('Yes')

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

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

L = sorted(L)

for x in L[:N-1]:
    sum += x

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

Solution (Python):



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

Solution (Python):
import numpy as np

n = int(input())
len_box = []
for _ in input().split():
    len_box.append(int(_))
len_box = np.array(len_box)
len_max = np.max(len_box)
len_sum = np.sum(len_box)
if (len_sum-len_max) > len_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):
N = int(input())
L = tuple(int(x) for x in input().split())

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

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

Solution (Python):

n = int(input())


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



mx = max(l)
if mx < sum(l)-mx:
    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 = [i for i in map(int, input().split())]
ans = 'Yes'
if max(L) >= sum(L) - max(L):
  ans = 'No'
print(ans)

Solution (Python):
N=int(input())
lists=[-int(a) for a in input().split(" ")]
lists.sort()
max=lists[0]
sum=0
for a in range(1,N):
    sum+=lists[a]
if(max>sum):
    print("Yes")
else:
    print("No")

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

L_chk = sum(L) - max(L)

if (L_chk > max(L)):
    print("Yes")
else:
    print("No")

Solution (Python):

"""
B - Polygon

"""
import sys
from sys import stdin
input = stdin.readline


def solve(L):
    return 'Yes' if L[-1] < sum(L[:-1]) else 'No'


def main(args):
    N = int(input())
    L = sorted([int(l) for l in input().split()])
    print(solve(L))


if __name__ == '__main__':
    main(sys.argv[1:])

Solution (Python):
import numpy as np
i = input()
l = [int(j) for j in input().split()]
ls = np.sort(l)
s = np.sum(ls) - ls[-1]
print("Yes" if s > ls[-1] else "No")

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
ans = 'Yes'
lmax = max(L)
L.remove(max(L))
if lmax >= sum(L):
    ans = 'No'
print(ans)

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

Solution (Python):
def can_be_drawn(L):
        sum_len = 0
        max_len = 0
        for l in L:
                sum_len += l
                max_len = max(max_len, l)
        return 'Yes' if max_len < (sum_len - max_len) else 'No'


input()
L = [int(v) for v in input().split()]
print(can_be_drawn(L))

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

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

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

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

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

Solution (Python):
import numpy as np
n = int(input())
data = np.array([int(i) for i in input().split()])
data = np.sort(data)[::-1]
if data[0]<data[1:].sum():
  print('Yes')
else:
  print('No')

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

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

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

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

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

if SUM>max(L):
  print("Yes")
else:
  print("No")

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

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

Solution (Python):
N = input()

sides = [int(i) for i in input().split()]
lMax = max(sides)
lSum = sum(sides) -lMax
if lSum > lMax:
    print("Yes")
else:
    print("No")

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

max_num = max(l)
max_index = l.index(max(l))
l.pop(max_index)

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

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

    l.remove(lmax)

    for i in l:
        s += i
    if lmax < s :
        print("Yes")
    elif lmax >= s :
        print("No")

if __name__ == '__main__':
    main()

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

Solution (Python):
import numpy as np

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

l_max = np.max(l)
l_other_sum = sum(l) - l_max

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

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

s = sum(l) - 2*max(l)

if(s>0):
    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+=l[i]
if(s<=l[n-1]):
  print("No")
else:
  print("Yes")

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

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

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

Solution (Python):
N = int(input())
Lin = input().split(" ")

Lls = []

for i in range(0,N):
    Lls.append(int(Lin[i]))

Lls.sort(reverse = True)

maxSide = Lls[0]
otherSide = 0
for i in range(1,N):
    otherSide = otherSide + Lls[i]

if maxSide < otherSide:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
number_list = []
for i in map(int, input().split()):
    number_list += [i]

for i in range(N-1):
    for j in range(N):
        if i < j:
            if number_list[i] > number_list[j]:
                a = number_list[i]
                number_list[i] = number_list[j]
                number_list[j] = a

sum = 0
for i in range(N-1):
    sum+=number_list[i]

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

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

long = l[0]
sum = 0

for i in range(1, len(l)):
    sum += l[i]

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

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

Solution (Python):


input()
ary = [int(s) for s in input().split()]

max_Hen = max(ary)
ary.remove(max(ary))
sum_Hen = sum(ary)

if(max_Hen < sum_Hen):
    print('Yes')
else:
    print('No')

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

Solution (Python):


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

l.sort()

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

Solution (Python):
num = input()

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

line.sort(reverse=True)

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

Solution (Python):
N = int(input())
L = input().split()
L = [int(s) for s in L]
i = 0
L_max = L[0]
for i in range(len(L)):
    if L_max < L[i]:
        L_max = L[i]
if L_max < sum(L) - L_max:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
L_ls = [int(i) for i in input().split()]
if sum(L_ls) - 2*max(L_ls) > 0:
  print("Yes")
else:
  print("No")

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

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

Solution (Python):
N = int(input())
L = input().split()
max = 0
total = 0
for i in range(N):
    if max < int(L[i]):
        max = int(L[i])
    else:
        pass
for i in range(N):
    total += int(L[i])
total = total - max

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

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

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

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

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

Solution (Python):
input()
l = [int(x) for x in input().split()]
print(["No","Yes"][2*max(l) < sum(l)])

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

max_len = max(l_list)
other_total = sum(l_list) - max_len

if max_len < other_total:
    print("Yes")
else:
    print("No")

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

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

if (l_sum - l_max > l_max):
    print ("Yes")
else:
    print ("No")

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

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

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

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

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

x = list(map(int,input().split()))
a = max(x)
sum = 0

for i in range(len(x)):
    sum += x[i]
if sum - a > a:
    print("Yes")
else:
    print("No")

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

s = sum(l)
res = "Yes"
for x in l:
  if (2*x>=s):
    res = "No"
print(res)

Solution (Python):
num = input()
lines = [int(x) for x in input().split()]
mx = max(lines)
ss = sum(lines) - mx

print(('Yes' if mx < ss else 'No'))

Solution (Python):

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

l_sum = 0
for i in range(len(l)):
    if i != l.index(max(l)):
        l_sum += l[i]

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

Solution (Python):
num = int(input())
l = list(map(int, input().split()))
max = l.pop(l.index(max(l)))
sum = 0
for i in range(len(l)):
    sum = sum + l[i]
if sum <= max:
    print('No')
else:
    print('Yes')

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
l2 = sorted(l)
maxl =l2.pop()
suml =sum(l2)
if maxl < suml:
    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 += L[i]
if (S <= L[n-1]):
  print('No')
else:
  print('Yes')

Solution (Python):


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

L_max = max(L)
L_sum = sum(L)

if L_max < L_sum-L_max :
  print ('Yes')
else :
  print('No')

Solution (Python):



def main():
    s1 = input()
    s2 = input()
    ret = solve(s1, s2)
    print(ret)


def solve(s1, s2):
    N = int(s1)
    L = [int(x) for x in s2.split()]
    if(max(L) < sum(L) - max(L)):
        return "Yes"
    else:
        return "No"


main()

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

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

Solution (Python):
def prob_b():
    N = int(input())
    P = list(map(int, input().split(' ')))

    longest = 0
    total_len = 0

    for p in P:
        longest = max(longest, p)
        total_len += p

    if (longest + longest) < total_len:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    prob_b()

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



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

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

Solution (Python):
N = int(input())
L = [int(x) for x in input().split(' ')]
nmax = 0
nsum = 0
for k in L:
    if nmax < k:
        nmax = k
    nsum += k

nsum -= nmax
if nsum > nmax:
    print('Yes')
else:
    print('No')

Solution (Python):
from sys import stdin

def main():
    N = stdin.readline().rstrip()
    L_list = [int(L) for L in stdin.readline().rstrip().split()]
    L_list.sort()
    if L_list[-1] < sum(L_list[:-1]):
        print('Yes')
    else:
        print('No')

if __name__ == "__main__":
    main()

Solution (Python):
import sys

sys.setrecursionlimit(200000)


def input():
    return sys.stdin.readline()[:-1]


def ii(t: type = int):
    return t(input())


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


def solve():
    N = ii()
    L = sorted(il())
    return "Yes" if L[-1] < sum(L[:-1]) else "No"


if __name__ == "__main__":
    print(solve())

Solution (Python):


index = int(input())


maximum = 0
other = 0
inputList = input().split()
for i in range(index):
    tmp = int(inputList[i])
    if tmp > maximum:
        maximum = tmp
        other = other + maximum
    else:
        other = other + tmp

if maximum < other - maximum:
    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_max < L_sum - L_max):
	print("Yes")
else:
	print("No")

Solution (Python):
N=int(input())
Ls=[i for i in map(float,input().strip().split())]
if N==len(Ls):
    mx=max(Ls)
    sm=sum(Ls)-mx
    if mx<sm:
        print("Yes")
    else:
        print("No")

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

Solution (Python):
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b



def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)



def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


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

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


if __name__ == '__main__':
    main()

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

print('Yes' if sum(l) - max(l) * 2 > 0 else '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()))
m = max(l)
if sum(l) - m > m:
    print('Yes')
else:
    print('No')

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

l.sort()
max = l.pop(-1)
sum = sum(l)
if sum>max:
    print("Yes")
else:
    print("No")

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

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

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

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

t_max=max(t)

j=0
t_sum=0
while j<=n-1:
    t_sum+=t[j]
    j+=1
        
if t_sum>2*t_max:
    print("Yes")
else:
    print("No")

Solution (Python):


N = int(input())
num = input().split(" ")
ans_list = []
for i in num:
    x = int(i)
    ans_list.append(x)
M = int(max(ans_list))
ans = 0
for i in ans_list:
    t = int(i)
    ans +=t 
if ans>(2*M):
    print("Yes")
else:
    print("No")

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

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

Solution (Python):
import sys
n = map(float, raw_input().split())
l = map(float, raw_input().split())
x = sum(l)-2*max(l)
if x>0:
    print("Yes")
else:
    print("No")

Solution (Python):
N=int(input())
lengths=[float(val) for val in input().split()]
max=max(lengths)
if sum(lengths)-max>max:
  print('Yes')
else:
  print('No')

Solution (Python):











import sys
sys.setrecursionlimit(10000)

def error_print(*args):
	print(*args, file=sys.stderr)

def mt(f):
	import time
	def wrap(*args, **kwargs):
		s = time.time()
		ret = f(*args, **kwargs)
		e = time.time()
		error_print(e - s, 'sec')
		return ret
	return wrap

def read_int(input=None):
	if input == None:
		input = sys.stdin.readline().strip()
	ret = [int(x) for x in input.split()]
	if len(ret) == 1:
		ret = ret[0]
	return ret

def read_float(input):
	if input == None:
		input = sys.stdin.readline().strip()
	ret = [float(x) for x in input.split()]
	if len(ret) == 1:
		ret = ret[0]
	return ret
	
def read_str(input):
	if input == None:
		input = sys.stdin.readline().strip()
	ret = [x for x in input.split()]
	if len(ret) == 1:
		ret = ret[0]
	return ret
		
@mt
def slv(*args): 
	
	
	
	if max(L) < sum(L) - max(L):
		ans = 'Yes'
	else:
		ans = 'No'
	
	
	return ans

if __name__ == '__main__':
	
	
	t = '''4
3 8 5 1'''.splitlines()
	
	
	
	
	N = read_int()
	L = read_int()
	
	
		
	
	
	
	print(slv(N, L))

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

lsmax = max(ls)
ls.remove(lsmax)

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

Solution (Python):
a = int(input())
L = list(map(int, input().split()))
ld = sorted(L, reverse=True)
max = ld[0]
ld.pop(0)
sum = sum(ld)

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

Solution (Python):
N = int(input())
LS = [int(i) for i in input().split()]
m = max(LS)
o = sum(LS) - m

if m < o:
  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())
ls = list(map(int, input().split(' ')))

l_max = max(ls)
l_sum = sum(ls)

if l_sum - l_max > l_max:
    print("Yes")
else:
    print("No")

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

if max(li_l) < sum(li_l) - max(li_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())
a=input().split()
for i in range(N):
  a[i]=int(a[i])
a.sort()
sum=0
m=len(a)-1
for i in range(m):
  sum+=a[i]
  
if sum>a[len(a)-1]:
  print("Yes")
else:
  print("No")

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

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

Solution (Python):
import numpy as np

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

max_value = np.max(L)
sum_value = np.sum(L)
print("Yes" if sum_value > 2 * max_value else "No")

Solution (Python):
n = input()
l = [int(i) for i in input().split()]
a = 0
max = max(l)
for i in l:
    a+=i
if 2*max<a:
    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())
L = list(map(int, input().split()))

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

Solution (Python):
N = int(input())
L = input()
L = L.split()
sum_N = 0
max_N = 0
for i, val in enumerate(L):
    L[i] = int(val)
    sum_N += L[i]
    if L[i] > max_N:
        max_N = L[i]
if max_N >= (sum_N - max_N):
    print('No')
else:
    print('Yes')

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

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

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

l.sort()

if l[-1] < sum(l[:-1]):
    print('Yes')

else:
    print('No')

Solution (Python):
n = int(input())
l = []
l = list(map(int,input().split()))
sum = 0

l.sort(reverse=True)
for index,item in enumerate(l):
    if(index!=0):
        sum += item

if l[0] < sum:
    print("Yes",end="")
else:
    print("No",end="")