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(x) for x in input().split()]

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

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

Solution (Python):
n=int(input())
s=list(map(int,input().split()))
x=max(s)
y=sum(s)
       
if y>2*x:
       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(reverse = True)
if L[0] < sum(L[1:]):
    print('Yes')
else:
    print("No")

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

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

Solution (Python):
num = int(input())
input_line = list(map(int,input().split(' ')))
input_line.sort()
large = input_line.pop(-1)
if(sum(input_line)>large):
    print('Yes')
else:
    print('No')

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

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

lis = sorted(lis)

m = max(lis)

oth = sum(lis[:n-1])

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

Solution (Python):
def actual(n, L):
    max_l = max(L)
    others_l = sum(L) - max_l

    if max_l < others_l:
        return 'Yes'

    return 'No'

n = int(input())
L = list(map(int, input().split()))
print(actual(n, L))

Solution (Python):

def sums(a, l):
    return sum(a)-2*l


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

Solution (Python):
def linp():return list(map(int,input().split()))

n=int(input())
l=linp()
if max(l)>=sum(l)-max(l):
    print("No")
else:print("Yes")

Solution (Python):
N = int(input())
L = sorted(list(map(int, input().split())))
last = L.pop(N - 1)
if last < sum(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):
import sys
N=int(input())
L=list(map(int,input().split()))
c=sum(L)
for i in range(N):
  if L[i]>=c-L[i]:
    print("No")
    sys.exit()
print("Yes")

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())
a=[int(i) for i in input().split()]
b=sorted(a)
x=sum(b[-1:])
y=sum(b[:-1])
if y>x:
	print('Yes')
else:
	print('No')

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

L.sort(reverse = True)
sum = 0

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

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

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

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)*2 - sum(L) < 0:
    print('Yes')
else:
    print('No')

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

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

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

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

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

p=list(map(int, input().split()))
pm=max(p)
p.remove(pm)
if pm<sum(p):
  print('Yes')
else:
  print('No')

Solution (Python):
import sys
import math
from collections import Counter
import itertools
import fractions
import datetime
from decimal import Decimal



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 LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'


p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")



N=II()
L = LI()

L.sort()

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

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

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

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

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

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

Solution (Python):



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

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

Solution (Python):
import sys
N = int(sys.stdin.readline().rstrip())
L = list(map(int, sys.stdin.readline().rstrip().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())
list = [int(i) for i in input().split()]

max = max(list)
sum = sum(list)

if sum > 2*max:
  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):
number = int(input())

sides = [int(val) for val in input().split(' ')]

longest = max(sides)
all = sum(sides)

if longest < all - longest:
  print('Yes')
else:
  print('No')

Solution (Python):
n=int(input())
l=[int(i) for i in input().split()]
l.sort()
if sum(l[:-1])>l[n-1]:
	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):
def resolve():
    N = int(input())
    L = [int(i) for i in input().split()]
    if max(L) < (sum(L) - max(L)):
        print("Yes")
    else:
        print("No")


resolve()

Solution (Python):
N=int(input())
A=sorted(map(int,input().split()))
ans=0
for i in range(N-1):
  ans+=A[i]

if ans<=A[N-1]:
  print("No")
else:
  print("Yes")

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

max_l = max(l)

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

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

maxl = max(l)
maxli = l.index(maxl)
del l[maxli]

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

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
L_max = max(L)
if sum(L) > 2*L_max:
    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()))
M = max(l)
L = sum(l)-M
if 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())
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()))

longest =max(l)

index = l.index(longest)

total = 0
for i in range(n):
    if i!=index:
        total+=l[i]

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

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

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

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

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

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

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

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

dec = max(S)
total = 0

for i in S:
  total += i
total -= dec
if total > dec:
  print("Yes")
else:
  print("No")

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

M = L.pop()
if M < sum(L):
    print('Yes')
else:
    print('No')

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

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

Max = l[0]
for i in range(n):
	if Max < l[i]:
		Max = l[i]
		
l.remove(Max)
s = sum(l)
if Max < s:
	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=input()
*l,a=sorted(map(int,input().split()))
if sum(l)>a:
  print("Yes")
else:print("No")

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

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

for i in range(N):
  count += int(L[i])
  if max < int(L[i]):
    max = int(L[i])
    
if count > 2*max:
  print("Yes")
else:
  print("No")

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

Solution (Python):

n = int(input())
A = [int(x) for x in input().split()]
A.sort()
s = 0
for i in range(n-1):
    s += A[i]
if A[-1] < s:
    print('Yes')
else:
    print('No')

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

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

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

l.sort(reverse=True)
sum = 0
for i in range(1, n):
    sum += l[i]

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

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

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

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
max=max(l)
cnt=0
c=0
for i in range(n):
    if l[i]==max and cnt==0:
        cnt+=1
    else:
        c+=l[i]
if max<c:
    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):
t = int(input())
a = list(map(int,input().split()))
lon = max(a)
a.remove(lon)
k = sum(a)

if lon < k :
  print("Yes")
else :
  print("No")

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

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(N: int, L: "List[int]"):
    L.sort()
    return YES if sum(L[:-1]) > L[-1] else NO



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    L = [int(next(tokens)) for _ in range(N)]  
    print(solve(N, L))

if __name__ == '__main__':
    main()

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

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

Solution (Python):

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

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

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

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

big = s_l[a-1]
small = 0

for i in range(a-1):
  small += s_l[i]
if big < small:
  print('Yes')
else:
  print('No')

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

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

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

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

Solution (Python):
N=int(input())
L=[int(i) for i in input().split()]
ma=max(L)
sum_=0
ma_index=L.index(ma)
for i in range(N):
  if i!=ma_index:
    sum_=sum_+L[i]
  else:
    pass
if ma<sum_:
  print("Yes")
else:
  print("No")

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

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

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

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

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

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

Solution (Python):
if __name__ == '__main__':
    n = int(input())
    a = [int(i) for i in input().split()]
    a.sort(reverse=True)
    if a[0] < sum(a[1:]):
        print("Yes")
    else:
        print("No")

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

Solution (Python):

import sys
input = sys.stdin.readline









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

maxL = max(L)

print("Yes" if sum(L)-maxL > maxL else "No")

Solution (Python):






import sys
input = sys.stdin.readline

import math
import bisect
from collections import deque
from fractions import gcd
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]


def Yes(): print("Yes"); return
def No(): print("No"); return


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr


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


def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count





N = inputI()
l = inputIL()
l.sort()
if sum(l[:-1]) <= l[-1]:
  No()
else:
  Yes()

Solution (Python):
import sys

input = sys.stdin.readline


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

    max_L = max(L)
    sum_L = sum(L)
    if max_L < sum_L - max_L:
        ans = "Yes"
    else:
        ans = "No"

    print(ans)


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):
import sys
from fractions import gcd
def input(): return sys.stdin.readline().strip()


def main():
    N = int(input())
    L = list(map(int, input().split()))
    L.sort()
    m = L.pop()
    if m < sum(L): print("Yes")
    else: print("No")

if __name__ == "__main__":
    main()

Solution (Python):


n = int(input())
l = list(map(int, input().split()))
m = sum(l)
a = 0
for i in range(n):
    if l[i] >= m - l[i]:
        print("No")
        a = 1
        break
if a == 0:
    print("Yes")

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

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

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

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

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

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

if a>=b:
  print('No')
else:
  print('Yes')

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

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

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

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

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
from fractions import gcd
import sys
def input(): return sys.stdin.readline().rstrip()
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = 10**18


n = I()
L = LI()
if max(L)*2 < 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):

"""
Created on Wed May 13 14:08:20 2020

@author: shinba
"""


n = int(input())

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

L.sort()

M = L.pop()

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

Solution (Python):


import sys






















def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    n = ii()
    L = lmi()
    print('Yes') if sum(L) - max(L) > max(L) else print('No')


if __name__ == "__main__":
    main()

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

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

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

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

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

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

Solution (Python):
import sys
import math
import bisect


def main():
    n = int(input())
    A = list(map(int, input().split()))
    if sum(A) - max(A) > max(A):
        print('Yes')
    else:
        print('No')

if __name__ == "__main__":
    main()

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

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

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

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

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

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

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

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

s.sort()

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

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

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

Solution (Python):


N = int(input())
L = list(int(x) for x in input().split())
L.sort(reverse=True)

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

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

Solution (Python):
n = int(input())
l = sorted(map(int, input().split()))
ans = 'Yes' if l[-1] < sum(l)-l[-1] else '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):
N = int(input())
L = list(input().split())
L = [int(L[i]) for i in range(N)]

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

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

Solution (Python):
import numpy as np


N = int(input())
L = list(map(int, input().split()))
maxL = max(L)
argmaxL = np.argmax(L)
L.pop(argmaxL)
if maxL < sum(L):
  print('Yes')
else:
  print('No')

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

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

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

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

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

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

Solution (Python):
import itertools
import math

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

maxi_idx = l.index(max(l))
sum = 0
for i in range(n):
    if i != maxi_idx:
        sum += l[i]

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

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

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

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

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

Solution (Python):
input();v=sorted(map(int,input().split()));print("YNeos"[v[-1]>=sum(v[:-1])::2])

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 = 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()))
sum=0
max=0
for i in L:
    if i>max:
        sum+=max
        max=i
    else:
        sum+=i
if max<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())
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()))

l.sort()

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

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

Solution (Python):
n = int(input())
ar = list(map(int,input().split()))
l = max(ar)
if 2*l < sum(ar):
  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 = sorted([int(x) for x in input().split()], reverse=True)
print("Yes" if l_list[0] * 2 < sum(l_list) 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):
ii = lambda:int(input())
mi = lambda:list(map(int,input().split()))
ix = lambda x:list(input() for _ in range(x))
mix = lambda x:list(mi() for _ in range(x))
iix = lambda x:list(int(input()) for _ in range(x))

def main(n,l):
    maxval = max(l)
    th = sum(l) - maxval
    return "Yes" if maxval < th else "No"

n = ii()
l = mi()
print(main(n,l))

Solution (Python):
n = int(input())
l_list = list(map(int,input().split()))
c = 0
for hoge in l_list:
  c += hoge
e = 0
for poge in l_list:
  if c-poge <= poge:
    e += 1
if e == 0:
  print('Yes')
else:
  print('No')

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

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

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

Solution (Python):
n = int(input())
l = [int(i) for i in input().split()]
l.sort(reverse=True)
a = l.pop(0)
if a < sum(l):
    print("Yes")
else:
    print("No")

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

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

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

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

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

for i in a:
    ans+=i
if ans-max(a)<=max(a):
    print("No")
else:
    print("Yes")

Solution (Python):
n = int(input())
L = list(map(int,input().split()))
kekka = 0
for i in range(n):
  if 2*L[i] >= sum(L):
    kekka = 1
    break
    
if kekka == 1:
  print('No')
else:
  print('Yes')

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
mli = L.index(max(L))
if L[mli] < sum(L[:mli]+L[mli+1:]):
    print("Yes")
else:
    print("No")

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

if L[len(L)-1] < sum(L[:len(L)-1]):
    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()))
m=max(l)
l.remove(m)
print('Yes' if m<sum(l) else 'No')