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):
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools
import numpy as np

sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]


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 LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    N = I()
    L = LI()

    max_line = np.argmax(L)
    if L[max_line] < sum([i for idx, i in enumerate(L) if idx != max_line]):
        print("Yes")
    else:
        print('No')



main()

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

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

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

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

l_max = max(l)
index_max = l.index(l_max)

sum = sum(l) - l_max

if (sum > l_max):
    print('Yes')
else:
    print('No')

Solution (Python):
import sys

input = sys.stdin.readline

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

Solution (Python):
n = int(input())
l = list(int(x) for x in input().split())
s = 0
for i in range(n):
    s += l[i]
s -= max(l)

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

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

Solution (Python):

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

maxL = max(L)
sumL = 0
for tmpL in L:
    sumL = sumL + tmpL

if sumL - maxL > maxL:
    print("Yes")
else:
    print("No")

Solution (Python):
import numpy as np
N = int(input())
L = [int(x) for x in input().split(' ')]
myarray = np.array(L)
Lmax = np.max(myarray)
Lsum = np.sum(myarray) - Lmax
if Lmax < Lsum:
    print('Yes')
else:
    print('No')

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

Solution (Python):
N = int(input())
L = [int(x) for x in input().split()]
L.sort()
max_length = L[len(L)-1]
L[len(L)-1] = 0
other_length_sum = sum(L)
if max_length<other_length_sum:
    print('Yes')
else:
    print('No')

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

if sum(b) > max_b:
  print('Yes')
else:
  print('No')

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

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

L.sort()

sum_ = 0
for l in L[:-1]:
    sum_ += l
if sum_ > L[-1]:
    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 l[0]<sum:
    print('Yes')
else:
    print('No')

Solution (Python):
import numpy as np
n = int(input())
l = list(map(int,input().split()))
lmax = np.argmax(l)
if l[lmax] < sum(l)-l[lmax]:
    print('Yes')
else:
    print('No')

Solution (Python):
N=int(input())
Y=input()
X=[]
X=Y.split(" ") 
Z=[int(i) for i in X] 
Z=sorted(Z,reverse=True) 
a=0
for i in range(1,N):
     a=a+Z[i]
if a>Z[0]:
    print('Yes')
else:
    print('No')

Solution (Python):
from sys import stdin

N = int(stdin.readline().rstrip())
Ls = [int(x) for x in stdin.readline().rstrip().split()]

Ls.sort(reverse=True)

maxv = Ls[0]
sum = 0
for x in Ls[1:]:
    sum = sum + x
    
if maxv < sum:
    print("Yes")
else:
    print("No")

Solution (Python):
_ = input()
input_line = input()



numbers = [int(element) for element in input_line.split(' ')]

numbers.sort()

longest = numbers.pop()
sum_rest = sum(numbers)

if longest < sum_rest:
    print("Yes")
else:
    print("No")

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

Max = max(L)
L.remove(Max)       
if(sum(L) > Max):
    print("Yes")
else:  
    print("No")

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

res = 'Yes'
for i in range(N):
	if L[i] >= sum(L[:i]) + sum(L[i + 1:]):
		res = 'No'

print(res)

Solution (Python):
import sys

lines = sys.stdin.readlines()
N = int(lines[0])
L = [int(x) for x in lines[1].split()]

max_L = max(L)

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

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


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

lenmax = 0
for i in range(N):
	if (lenmax < L[i]):
		lenmax = L[i]
		intmax = i

sumother=0
for i in range(N):
	if (i!= intmax):
		sumother += L[i]

if(sumother > lenmax):
	print('Yes')
else:
	print('No')

Solution (Python):
import numpy as np


n = input()
a = list(int(i) for i in input().split())  
arg = np.argmax(a)
max_a = a[arg]
a = np.delete(a,arg)
if np.sum(a) >max_a:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys
stdin = sys.stdin
def li(): return map(int, stdin.readline().split())
def ni(): return int(stdin.readline())

N = ni()
L = tuple(li())
L_MAX = max(L)
SUM = sum(L)
if 2*L_MAX < SUM:
  print('Yes')
else:
  print('No')

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

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

Solution (Python):
n = input()
length = input().strip().split()
i_length = [int(s) for s in length]
max_value = max(i_length)
sum_value = sum(i_length)

if max_value < sum_value - max_value:
    print('Yes')
else:
    print('No')

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

a_max = max(a)
a_max_index = a.index(max(a))

check = 0
for i,j in enumerate(a):
    if i != a_max_index:
        check += j
        
if check > a_max:
    print('Yes')
else:
    print('No')

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

l.sort(reverse=True)
a = 0

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

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

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

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

max_l = max(l)
all_s = sum(l)
if (all_s - max_l*2)>0:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
L = list(map(int,input().split()))
print("YNeos "[(max(L) >= (sum(L) - max(L)))::2])

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

L_list.sort()

if sum(L_list[0:-1]) > L_list[-1]:
    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):
n=int(input())
l=list(map(int,input().split()))
a=max(l)
s=0
for i in range(n):
    s+=l[i]
if s-a>a:
    print('Yes')
else:
    print('No')

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


if high < sum(sorted_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()))
Lm = max(L)
if 2 * Lm < sum(L):
    print('Yes')
else:
    print('No')

Solution (Python):

"""
Created on Sun Feb  3 21:02:18 2019

@author: doppe
"""

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

L.sort()
sum = 0
for i in range(0, len(L) - 1):
    sum += L[i]
if (L[len(L) - 1] >= sum):
    print("No")
else:
    print("Yes")

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

ld = sorted(l, reverse=True)
if max(ld) < sum(ld) - max(ld):
    print('Yes')
else:
    print('No')

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

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

if max_l < (sum_l - max_l):
    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("No")
else:
    print("Yes")

Solution (Python):
import numpy as np

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

L_list = L_list

max_idx = np.argmax(L_list)
sum_edges = np.sum(L_list)

if sum_edges > 2 * L_list[max_idx]:
    print("Yes")
else:
    print("No")

Solution (Python):
n = input()
a = input().split()
a = [int(_) for _ in a]
a.sort()
b = a.pop()
c = sum(a)
if c > b:
    print('Yes')
else:
    print('No')

Solution (Python):
import math

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

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

Solution (Python):
x = int(raw_input())
q = map(int,raw_input().split())

m = max(q)
q.remove(m)
m2 = 0
for a in q:
  m2 += a
if m < m2:
  print "Yes"
else:
  print "No"

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

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

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

import numpy as np
print('Yes' if L.pop(np.argmax(L)) < sum(L) else 'No')

Solution (Python):


import sys, re
from collections import deque, defaultdict, Counter
from math import sqrt, hypot, factorial, pi, sin, cos, radians
if sys.version_info.minor >= 5: from math import gcd
else: from fractions import gcd 
from heapq import heappop, heappush, heapify, heappushpop
from bisect import bisect_left, bisect_right
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from functools import reduce, partial
from fractions import Fraction
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def ceil(a, b=1): return int(-(-a // b))
def round(x): return int((x*2+1) // 2)
def fermat(x, y, MOD): return x * pow(y, MOD-2, MOD) % MOD
def lcm(x, y): return (x * y) // gcd(x, y)
def lcm_list(nums): return reduce(lcm, nums, 1)
def gcd_list(nums): return reduce(gcd, nums, nums[0])
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N = INT()
L = LIST()
L.sort(reverse=True)

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

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

lmax = ls[-1]
lsum = sum(ls[:-1])

print('Yes' if lmax < lsum else 'No')

Solution (Python):
from sys import stdin

N = int(stdin.readline().rstrip())
L = [int(x) for x in stdin.readline().rstrip().split()]

sortL = sorted(L, reverse=True)
if sortL[0] < sum(sortL[1:N]):
    print('Yes')
else:
    print('No')

Solution (Python):
input()

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

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

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

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

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

L.sort()
L.reverse()

max_l = L[0]

sum_l = sum(L) - max_l

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

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

ll.sort()
longest=ll[len(ll)-1]

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

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

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

s = sum(lis)
m = max(lis)

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

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

l.sort()
l.reverse()

maxLen = l[0]
otherLen = 0

for i in range(len(l)):
    if not i == 0:
        otherLen += l[i]




if maxLen < otherLen:
    print('Yes')
else:
    print('No')

Solution (Python):


N = int(input())

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

length = 0

M = max(L)

for l in L:
	length += l

if length - 2*M > 0:
	print("Yes")
else:
	print("No")

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

Solution (Python):
def solve(n, l):
    m = max(l)
    l.remove(m)
    t = sum(l)
    if t > m:
        print("Yes")
    else:
        print("No")

def main():
    n = int(input())
    l = list(map(int, input().split()))
    solve(n, l)        

main()

Solution (Python):
n = int(input())
l = input().split()
max = 0
sum = 0
for i in range(n):
    l[i] = int(l[i])
    sum += l[i]
    if max <= l[i]:
        max = l[i]


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

Solution (Python):
def main():
    N = int(input())
    L = list(map(int, input().split()))
    L_max = max(L)
    L_sum = 0
    L_sum -= L_max
    for l in L:
        L_sum += l
    if L_max < L_sum:
        print('Yes')
    else:
        print('No')


if __name__ == "__main__":
    main()

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

m = max(l)
l.remove(m)

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

Solution (Python):
n=int(input())
ans=True
l=[int(i) for i in input().split()]
maxnum=max(l)
l.remove(maxnum)
sum=0
for i in l:
    sum+=i
if sum>maxnum:
    print('Yes')
else:
    print('No')

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

max_num = max(l)
sum_num = sum(l) - max_num

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

Solution (Python):



N = int(input())
lst = list(map(int,input().split()))
lst.sort(reverse = True)
count = 0
longest = 0
for n,i in enumerate(lst):
    if n == 0:
        longest = i
    else:
        count += i

if longest < count:
    print("Yes")
else:
    print("No")

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

Solution (Python):
N = int(input())
L = input().split()
L = [int(i) for i in L]
L = sorted(L, reverse=True)
hen = 0

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

Solution (Python):
N = int(input())
L_n = list(map(lambda x: int(x),input().split()))

max_num = max(L_n)
L_n.remove(max_num)

if max_num < sum(L_n):
    print('Yes')
else:
    print('No')

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

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

Solution (Python):

def getInt(): return int(input())
def getIntList(): return [int(x) for x in input().split()]
def zeros(n): return [0]*n
def db(x): 
    global debug
    if debug: print(x)
debug = False
N = getInt()
L = getIntList()
L.sort()
L.reverse()
db((N,L))
sm = 0
for i in range(1,N):
    sm += L[i]
db(sm)
if L[0]<sm: print('Yes')
else: print('No')

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

maxL = max(L)
maxIndex = L.index(maxL)
L.pop(maxIndex)
total = 0
for l in L:
    total += l

if maxL < total:
    print("Yes")
else:
    print("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')
elif lmax >= lsum:
    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())
A = li = list(map(int,input().split()))
A.sort()

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

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

Solution (Python):
import numpy as np

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

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

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

l = [int(i) for i in input().split()]
m = max(l)
l.pop(l.index(m))

total = sum(l)

if total > m:
  print("Yes")
else:
  print("No")

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

if L[0] < ans:
    print("Yes")
else:
    print("No")

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

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())
Llist = [int(x) for x in input().split()]
sortedList = sorted(Llist, reverse=True)
sumL = 0
for i,x in enumerate(sortedList):
    if i == 0:
        continue
    sumL = sumL + x
if sortedList[0] < sumL:
    print('Yes')
else:
    print('No')

Solution (Python):
n = input()
edges = [int(i) for i in input().split()]
max_edge = max(edges)
edges.remove(max_edge)

if max_edge < sum(edges):
    print("Yes")
else:
    print("No")

Solution (Python):
import sys
from operator import itemgetter


def r(n, l):
    l.sort(reverse=True)
    lm = l[0]
    ln = sum(l[1:])
    return 'Yes' if lm < ln else 'No'


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

    print(r(n, l))


if __name__ == '__main__':
    main()

Solution (Python):


import copy
import numpy as np
import random

n = int(input())

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

sum_all = 0
for i in range(n):
    sum_all += l[i]

answer = "Yes"
for i in range(n):
    if l[i] < sum_all-l[i]:
        pass
    else:
        answer = "No"

print(answer)

Solution (Python):
import sys

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


longest_index = l_list.index(max(l_list))
other_sum = 0

for i in range(n):
    if i == longest_index:
        continue
    else:
        other_sum += l_list[i]

if l_list[longest_index] < other_sum:
    print("Yes")
else:
    print("No")

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

Solution (Python):
import numpy as np

N=int(input())
x=input().split()
y=[int(i) for i in x]
y.sort()
S=0
for i in y:
    S+=i
S-=y[N-1]
if(S<=y[N-1]):
    print("No")
else:
    print("Yes")

Solution (Python):
num = int(input())
lens = [int(a) for a in input().split(' ')]
max_len = max(lens)
lens.remove(max_len)
sum_lens = sum(lens)
 
if max_len < sum_lens:
  print('Yes')
else:
  print('No')

Solution (Python):

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

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

Solution (Python):
from sys import stdin
N=int(stdin.readline().rstrip())
data=[int(x) for x in stdin.readline().rstrip().split()]
dmax=max(data)
data.remove(dmax)
dsum=sum(data)
if dsum>dmax:
    print("Yes")
else:
    print("No")

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

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

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

Solution (Python):

import sys

import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

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

b = sorted(a)

mx = b[-1]
cnt = 0
for i in range(len(b) - 1):
    cnt += b[i]
print("Yes" if cnt > mx else "No")

Solution (Python):
B=int(input())
A=list(map(int,input().split(" ")))
m=max(A)
A.remove(m)
if sum(A)>m:
    print("Yes")
else:
    print("No")

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

def compare(a1, a2):
    if a1 < a2:
        return True
    else:
        return False

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

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

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

Solution (Python):
N = int(input())
L = [int(i) for i in input().split()]
m = max(L)
s = 0
i = True
for j in L:
    if m == j and i:
        i = False        
        continue
    s += j

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

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

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

Solution (Python):


_ = input()
ls = list(map(int, input().split()))

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

Solution (Python):
from sys import stdin

n = stdin.readline().rstrip()
l = list(map(lambda x: int(x), stdin.readline().rstrip().split(" ")))

sum = 0
for li in l:
    sum += li

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

Solution (Python):


n = int(input())

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


li.sort()

sum_ = sum( li[i] for i in range( len(li)-1 ) )

print( 'Yes' if sum_ > li[n-1] else 'No' )

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

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

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

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

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

print(answer)

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(i) for i in 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()
s = sum(L[:-1])
if L[n-1] < s:
    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())
len_list = [int(each) for each in input().split()]
len_list.sort()
max_side = len_list[N-1]
sum_o = 0.0
for i in range(N-1):
    sum_o += len_list[i]
if(sum_o > max_side):
    print("Yes")
else:
    print("No")

Solution (Python):


N = int(input())

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

L.sort()

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

Solution (Python):



def main():
    """Function."""
    n = int(input())
    ls = list(map(int, input().split()))

    max_val = max(ls)
    flag = 0
    total = 0
    for i in range(n):
        if ls[i] == max_val:
            if flag == 0:
                flag = 1
                pass
            else:
                total += ls[i]
        else:
            total += ls[i]

    if max_val < total:
        print("Yes")
    else:
        print("No")



if __name__ == "__main__":
    main()

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

Solution (Python):




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


max = 0

for i in range(n):
    if l[i] > max:
        max = l[i]
        max_idx = i


sum = 0
for j in range(n):
    if j != max_idx:
        sum += l[j]

if sum > max:
    ans = "Yes"
else:
    ans = "No"


print(ans)

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
t = 0
for l in L :
    t += l
t = t - max(L)

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

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

Solution (Python):
""" AtCoder """

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

L.sort()

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

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

l_max=max(L_list)
total_l=sum(L_list)-l_max

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

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

Solution (Python):
N = int(input())
S = input().split()
L = [int(s) for s in S]
L.sort(reverse=True)
if L[0] < sum(L[1:]):
    print("Yes")
else:
    print("No")

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


for i in range(len(L)):
    L[i] = int(L[i])

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

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

su = sum(L)
ma = max(L)

if su - ma > ma:
  print("Yes")
else:
  print("No")

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

Solution (Python):
import math
import sys
from operator import itemgetter








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


sum = 0
for i in L:
	sum += i
	
ans = "Yes"
if (max(L) >= sum - max(L)):
	print("No")
else:
	print("Yes")

Solution (Python):
def main(L):
    S = sum(L)
    for l in L:
        if S - l <= l:
            print("No")
            return None
    print("Yes")
    
N = int(input())
L = list(map(int, input().split()))
main(L)

Solution (Python):
n = int(input())
p = [int(_) for _ in input().split()]

mp = max(p)
print('Yes' if mp < sum(p) - mp else 'No')

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

t = sum(L)
L_max = max(L)

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

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

L.sort()
L.reverse()

subsum = 0
for i, l in enumerate(L):
	if i == 0:
		l_max = l
	else:
		subsum += l

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

Solution (Python):

"""
Created on Sun Jan 27 20:47:58 2019

@author: Owner
"""


import collections
import scipy.misc
import sys
import numpy as np
import math
from operator import itemgetter
import itertools
import copy


def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(int(i))
    i += 1
  if n > 1:
    table.append(int(n))
  return table   

def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []
    
def getNearestValueIndex(list, num):
    """
    概要: リストからある値に最も近い値のインデックスを取得する関数
    @param list: データ配列
    @param num: 対象値
    @return 対象値に最も近い値
    """

    
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

"""
N, X = map(int, input().split())

x = [0]*N
x[:] = map(int, input().split())

P = [0]*N
Y = [0]*N
for n in range(N):
    P[n], Y[n] = map(int, input().split())
    
all(nstr.count(c) for c in '753')

ABT = zip(A, B, totAB)
result = 0

sorted(ABT,key=itemgetter(2))


"""

N = int(input())

L = [0]*N
L[:] = map(int, input().split())


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

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

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

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

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

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

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

top = max(lines)
border = sum(lines) - top

if top < border:
	print("Yes")
else:
	print("No")

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

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

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

L_max = max(L)

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

Solution (Python):
N= int(input())
aL = [int(_) for _ in input().split()]
iL = sum(aL)
for i in range(N):
    if  iL - aL[i] <= aL[i]:
        print("No")
        exit()
print("Yes")

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

a = list[0]
del list[0]

print("Yes" if sum(list) > a else "No")

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

mx = max(le)
import numpy as np

le.remove(mx)
sumle = np.sum(le)

if (mx<sumle):
    print("Yes")

if (mx>=sumle):
    print("No")

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

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

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

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

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