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

Solution (Python):
n = int(input())
l = [int(s) for s in 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()))
Lmax = max(L)

L.remove(Lmax)
Lsum = sum(L)

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

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

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

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
max_L = max(L)
idx = L.index(max_L)
del L[idx]
if 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)
if a<b:
    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 sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

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

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

ans = "No"
if Lmax < (Lsum-Lmax):
    ans = "Yes"
print(ans)

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

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

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

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

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

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

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

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

print(ans)

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

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

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

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

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

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

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

judge = max(L) * 2 < sum(L)

if judge:
    print('Yes')
else:
    print('No')

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

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

L.sort()

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

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

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

X.sort()

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

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

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

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

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

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

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

if 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):
import sys

input = sys.stdin.readline
n = int(input())
l_list = list(map(int, input().split()))
l_max = max(l_list)
l_other = sum(l_list) - l_max
if l_other > l_max:
    print('Yes')
else:
    print('No')

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

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

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

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

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

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

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

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

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

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

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

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

lst.sort()

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

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

lmax = max(l)
lsum = sum(l) - lmax
ans = "No"
if lmax < lsum:
	ans = "Yes"
print(ans)

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

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

m = max(lis)
ind = lis.index(m)
s = 0
for i in range(len(lis)):
    if i == ind: pass
    else:
        s += lis[i]

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

Solution (Python):

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

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

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

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









l.sort()

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

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

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

if b > c:
	print("Yes")

else:
	print("No")

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

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

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

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

Solution (Python):
import numpy as np
import sys
input = sys.stdin.readline
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()
l = IL()

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 = sorted(L)
max_ = L[-1]
L = L[:-1]


print("Yes" if max_ < sum(L) else "No")

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

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

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

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

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

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

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

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

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

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

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


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
l = list(int(i) for i in input().split())
l = sorted(l, reverse=True)
rest = sum(l)-l[0]
if l[0]<rest:
    print("Yes")
else:
    print("No")

Solution (Python):
def inpl(): return [int(i) for i in input().split()]
N = int(input())
L = inpl()
print(['No', 'Yes'][2*max(L) < sum(L)])

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

L.sort(reverse = True)
l = L[0]

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

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

longest_edge = max(L_list)
sum_other_edges = sum(L_list) - longest_edge
if sum_other_edges > longest_edge:
    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()))

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

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

M = max(L)

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

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

Solution (Python):
import math
INF, MOD = float("inf"), 1e9 + 7
MAX, MIN = -INF, INF
dx1, dy1, dx2, dy2 = [-1, 0, 1, 0], [0, -1, 0, 1], [-1, 0, 1, -1, 1, -1, 0, 1], [-1, -1, -1, 0, 0, 1, 1, 1]

def get_int():
    return int(input())

def get_int_list():
    return list(map(int, input().split()))

def mins(x, y):
    x = min(x, y)

def maxs(x, y):
    x = max(x, y)

while(True):
    try:
        n = int(input())
        a = list(map(int, input().split()))
        mx = max(a)
        if (sum(a) - mx) > mx:
            print("Yes")
        else:
            print("No")
    except EOFError:
        exit()

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

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

Solution (Python):
n = int(input())
L = [int(i) for i in input().split()]
sumL = sum(L)
maxL = max(L)
print('Yes' if maxL < sumL - maxL else 'No')

Solution (Python):
N = int(input())
l_list = list(map(int, input().split()))
l_list.sort(reverse=True)
maxnum = l_list[0]
sum_num = sum(l_list[1:])

if maxnum < sum_num:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys
stdin = sys.stdin
 
sys.setrecursionlimit(10**5) 
 
def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

n = ni()
l = list(li())

longest = max(l)
others = sum(l) - longest
print('Yes') if others > longest else print('No')

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

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

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

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

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

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
m=max(l)
n=sum(l)-m
if m<n: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():
    num = int(input())
    data = list(map(int, input().split()))
    max_data = max(data)
    if sum(data) - max_data > max_data:
        print('Yes')
    else:
        print('No')
if __name__ == '__main__':
    main()

Solution (Python):
from statistics import mean, median,variance,stdev
import sys
import math
import fractions

def j(q):
    if q==1: print("Yes")
    else:print("No")
    exit(0)


def ct(x,y):
    if (x>y):print("")
    elif (x<y): print("")
    else: print("")

def ip():
    return int(input())

n = ip()                              



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





a.sort()
if max(a) < sum(a)-max(a): j(1)
else: j(0)

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()))
ans = sum(L) - 2 * max(L)
print(['No', 'Yes'][ans > 0])

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

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

Solution (Python):



import bisect

def IT(): 
    return int(input())
def IL(): 
    return [int(_) for _ in input().split()]
def IS(): 
    return [_ for _ in input().split()]
def ILS(n): 
    return [int(input()) for _ in range(n)]
def SLS(n): 
    return [input() for _ in range(n)]
def ILSS(n): 
    return [[int(_) for _ in input().split()] for j in range(n)]


def bit_full_search(ss):
    n = len(ss)
    for i in range(1 << n):
        s = ""
        for j in range(n + 1):
            if ((1 & i >> j) == 1):
                s += ss[j]
        print(s)
def bit_full_search2(A):
    
    value = []
    for i in range(1 << len(A)):
        output = []

        for j in range(len(A)):
            if ((i >> j) & 1) == 1:
                
                output.append(A[j])
        value.append([format(i, 'b').zfill(16), sum(output)])

    value.sort(key=lambda x:x[1])
    bin = [value[k][0] for k in range(len(value))]
    val = [value[k][1] for k in range(len(value))]
    return bin, val
def matching_bisect(list1_val, list2_val, n):
    
    j = 0
    for i in range(len(list1_val)):
        j = bisect.bisect_left(list2_val, n - list1_val[i])
        if j < len(list2_val):
            if list1_val[i] + list2_val[j] == n:
                
                break
    return j

"""ここからメインコード"""
def main():
    n = IT()
    l = IL()
    l.sort()
    l2 = l[-1]
    l.pop()
    if l2 < sum(l):
        print("Yes")
    else:
        print("No")


main()

Solution (Python):
n =int(input())
l = list(int(i) for i in input().split())
ans = 'Yes'
judge = sum(l)
for i in range(n):
    if l[i] < judge-l[i]:
        continue
    else:
        ans = 'No'
print(ans)

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

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

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

Solution (Python):
from sys import exit, setrecursionlimit, stderr
from functools import reduce
from itertools import *
from collections import defaultdict, Counter
from bisect import bisect

setrecursionlimit(10**7)

def read():
  return int(input())

def reads():
  return [int(x) for x in input().split()]

N = read()
L = reads()
L.sort()
print("Yes" if sum(L[:-1]) > L[-1] else "No")

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

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

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

Solution (Python):
N = int(input())
*L, = map(int, input().split())
S = sum(L)

print("Yes" if all(L[i] < S - L[i] for i in range(N)) else "No")

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

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

Solution (Python):

import sys





"""Template"""


class IP:
    """
    入力を取得するクラス
    """
    def __init__(self):
        self.input = sys.stdin.readline

    def I(self):
        """
        1文字の取得に使います
        :return: int
        """
        return int(self.input())

    def S(self):
        """
        1文字の取得(str
        :return: str
        """
        return self.input()

    def IL(self):
        """
        1行を空白で区切りリストにします(int
        :return: リスト
        """
        return list(map(int, self.input().split()))

    def SL(self):
        """
        1行の文字列を空白区切りでリストにします
        :return: リスト
        """
        return list(map(str, self.input().split()))

    def ILS(self, n):
        """
        1列丸々取得します(int
        :param n: 行数
        :return: リスト
        """
        return [int(self.input()) for _ in range(n)]

    def SLS(self, n):
        """
        1列丸々取得します（str
        :param n: 行数
        :return: リスト
        """
        return [self.input() for _ in range(n)]

    def SILS(self, n):
        """
        Some Int LineS
        横に複数、縦にも複数
        :param n: 行数
        :return: list
        """
        return [self.IL() for _ in range(n)]

    def SSLS(self, n):
        """
        Some String LineS
        :param n: 行数
        :return: list
        """
        return [self.SL() for _ in range(n)]


class Idea:
    def __init__(self):
        pass

    def HF(self, p):
        """
        Half enumeration
        半分全列挙です
        pの要素の和の組み合わせを作ります。
        ソート、重複削除行います
        :param p: list : 元となるリスト
        :return: list : 組み合わせられた和のリスト
        """
        return sorted(set(p[i] + p[j] for i in range(len(p)) for j in range(i, len(p))))

    def Bfs2(self, a):
        """
        bit_full_search2
        bit全探索の改良版
        全探索させたら2進数のリストと10進数のリストを返す
        :return: list２つ : １個目 2進数(16桁)  2個目 10進数
        """
        
        
        
        value = []
        for i in range(1 << len(a)):
            output = []

            for j in range(len(a)):
                if self.bit_o(i, j):
                    """右からj+1番目のiが1かどうか判定"""
                    
                    output.append(a[j])
            value.append([format(i, 'b').zfill(16), sum(output)])

        value.sort(key=lambda x: x[1])
        bin = [value[k][0] for k in range(len(value))]
        val = [value[k][1] for k in range(len(value))]
        return bin, val

    def S(self, s, r=0, m=-1):
        """
        ソート関係行います。色々な設定あります。
        :param s: 元となるリスト
        :param r: reversするかどうか 0=False 1=True
        :param m: （2次元配列）何番目のインデックスのソートなのか
        :return: None
        """
        r = bool(r)
        if m == -1:
            s.sort(reverse=r)
        else:
            s.sort(reverse=r, key=lambda x: x[m])

    def bit_n(self, a, b):
        """
        bit探索で使います。0以上のときにTrue出します
        自然数だからn
        :param a: int
        :param b: int
        :return: bool
        """
        return bool((a >> b & 1) > 0)

    def bit_o(self, a, b):
        """
        bit探索で使います。1のときにTrue出すよ
        oneで1
        :param a: int
        :param b: int
        :return: bool
        """
        return bool(((a >> b) & 1) == 1)

    def ceil(self, x, y):
        """
        Round up
        小数点切り上げ割り算
        :param x: int
        :param y: int
        :return: int
        """
        return -(-x//y)

    def ave(self, a):
        """
        平均を求めます
        :param a: list
        :return: int
        """
        return sum(a) / len(a)


"""ここからメインコード"""


def main():
    
    r, e = range, enumerate
    ip = IP()
    id = Idea()

    """この下から書いてね"""
    n = ip.I()
    l = ip.IL()

    id.S(l, 1)
    o = l[0]
    l.pop(0)
    if o < sum(l):
        print("Yes")
    else:
        print("No")


main()

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

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

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

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

a.sort()
a.reverse()

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

Solution (Python):
N=int(input())
L=[int(i) for i in input().split(" ")]
L=sorted(L)
if L[-1]<sum(L[:N-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):

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

Solution (Python):
def read():
    return int(input())


def readlist():
    return list(map(int, input().split()))


def readmap():
    return map(int, input().split())


N = read()
L = readlist()
L.sort()
if sum(L[:(N-1)]) > L[N-1]:
    print("Yes")
else:
    print("No")

Solution (Python):
from sys import stdin
n = int(stdin.readline())
a = map(int,stdin.readline().split())
ans = 'Yes'
if sum(a) <= 2*max(a):
  ans = 'No'
print ans

Solution (Python):
n = int(input())
l = [int(i) for i in input().split()]
if sum(l) > max(l) * 2:
    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(float,input().split()))

l = sorted(l)

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

Solution (Python):
import sys

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

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

Solution (Python):
def func():
    pass


def main():
    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")


if __name__ == '__main__':
    main()

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

L = sorted([int(n) for n in input().split()])

s = sum(L[:-1])

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

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

n = ni()
a = na()

x = max(a)
s = sum(a)
if x < s-x:
    print("Yes")
else:
    print("No")

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

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

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

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

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

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

    L = sorted(L)

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


def main():
    solve()


if __name__ == '__main__':
    main()

Solution (Python):
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))

n = getN()
edge = getList()

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

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

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

xs = sorted(L)

result = xs[-1] < sum(xs[:-1])

if result:
    print("Yes")
else:
    print("No")

Solution (Python):
def solve(N, Ls):
    if max(Ls) < sum(Ls) - max(Ls):
        return "Yes"
    else:
        return "No"


if __name__ == "__main__":
    N = int(input())
    Ls = list(map(int, input().split(" ")))
    print(solve(N, Ls))

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

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

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

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

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

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

L.sort(reverse=True)

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

Solution (Python):


import sys


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

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()


n = II()
L = LI()
L.sort()

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

Solution (Python):

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

Solution (Python):
N = int(input())
X = [int(a) for a in input().split()]

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

Solution (Python):

def B():
    N = int(input())
    L = list(map(int, input().split()))
    L.sort()
    cnt = 0
    for i in range(N - 1):
        cnt += L[i]
    if L[-1] < cnt:
        print("Yes")
    else:
        print("No")
B()

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

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

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

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

Solution (Python):
N = input()
A = sorted(map(int, raw_input().split()))
S = sum(A)

if A[-1] < S - A[-1]:
    print "Yes"
else:
    print "No"

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

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

Solution (Python):
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()]
S=sum(L)-max(L)
T=max(L)
if T<S:
    print("Yes")
else:
    print("No")

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

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

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

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

l_max = max(L)
if l_max < sum(L) - l_max:
    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")