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



Sample input:
4
3 8 5 1


Sample output:
Yes

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if ans > l[n-1]:
  print('Yes')

else:
  print('No')

Submission status: Accepted

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

M = max(L)
L.remove(M)

S = 0
for i in range(len(L)):
  S += L[i]
  
if S > M:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
N= int(input())

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

l.sort()

a= l[N-1]
b = 0
for i in range (0,N-1):
	b+=l[i]

if b>a:
	print("Yes")

else:
	print("No")

Submission status: Accepted

Solution code:
"""#################################################################
【ABC117】
B_Polygon
#################################################################"""

#インポート
import sys

#入力用
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def IS(): return map(int, sys.stdin.readline().rstrip().split())
def II(): return int(sys.stdin.readline().rstrip())
def SS(): return sys.stdin.readline().rstrip().split()
def S(): return sys.stdin.readline().rstrip()

N = II()
lst = sorted(LI())
if lst[-1]< sum(lst[:-1]):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n=input();l=sorted(map(int,input().split()));print("YNeos"[sum(l[:-1])<=l[-1]::2])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
N = input()
lst = input().split(" ")
lst2 = []
for i in lst:
    int_i = int(i)
    #print(int_i)
    lst2.append(int_i)
#print(lst2)
max  = max(lst2)
#print(max)
sum = sum(lst2)
#print(sum)
if sum - max > max:
    print("Yes")
else:
    print("No")
#input()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

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

Submission status: Accepted

Solution code:
n = int(input())
x = list(map(int, input().split()))
 
longest = max(x)
x.remove(longest)
 
if longest < sum(x):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

L = sorted(L,reverse=True)
if L.pop(0) < sum(L):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import sys

n = input()
lengths = list(map(int,input().split(" ")))

lengths = sorted(lengths)
max = lengths.pop(-1)
if max < sum(lengths) :
    print("Yes")
else :
    print("No")

Submission status: Accepted

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

L = sorted(L)
LL = L[-1]
sL = 0
for i in range(N-1):
    sL += L[i]
    
if sL > LL:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = input()
li = list(map(int,input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    L = list(map(int, input().split()))
    sum = 0
    L.sort()
    for i in range(N - 1):
        sum += L[i]
    if sum > L[-1]:
        print("Yes")
    else:
        print("No")
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())
d = list(map(int,input().split()))

dmax = max(d)

dsum = sum(d)

tan = dsum - dmax

if tan > dmax:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

L.sort()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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


main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
L=list(map(int,input().split()))
L=sorted(L)
s=0
for i in range(N-1):
    s+=L[i]
if L[N-1]<s:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

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

tmp = max(L)
L.remove(tmp)
if tmp < sum(L):
	print("Yes")
else:
	print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(int,input().split()))
s=max(l)
l.sort()
l.remove(s)
if sum(l[0:len(l)+1]) > s:
 print("Yes")
else:
 print("No")

Submission status: Accepted

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

l.sort()
max_num = l.pop(n - 1)
total = sum(l)
if max_num < total:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
Li = list(map(int, input().split()))

Li.sort()
L_sum = sum(Li)
if Li[-1] < L_sum - Li[-1]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
L = list(map(int,input().split()))
Ma1 = max(L)
 
Su1 = sum(L)
 
hikaku = Su1 - Ma1
 
if hikaku > Ma1:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

tot=0
for i in range(1,n):
  tot+=l[i]
if tot>l[0]:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
l = sorted(list(map(int,input().split())),reverse = True)
s = 0

for i in l[1:]:
  s += i
  
if l[0] < s:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n, *l = map(int, open(0).read().split())
l.sort()
print(['No', 'Yes'][l[-1] < sum(l[:-1])])

Submission status: Accepted

Solution code:
"""
4
3 8 5 1

Yes
"""

num = int(input())
first = list(map(int, input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

L.sort(reverse=True)

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

Submission status: Accepted

Solution code:
l = input()
n = int(l)
l = input()
a = list(map(int, l.split(' ')))

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

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int,input().split()))
maxl = max(l)
l.remove(max(l))
if sum(l)>maxl:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
li = [int(_) for _ in input().rstrip().split()]

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

Submission status: Accepted

Solution code:
# coding: utf-8
n=int(input())
l=list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
n = int(input())
l = [int(x) for x in input().split()]
if sum(l) - 2 * max(l) > 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    L = [int(l) for l in input().split()]
    tot = sum(L)
    maxl = max(L)
    if maxl < (tot - maxl):
        return "Yes"
    return "No"

if __name__ == '__main__':
    print(main())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# B - Polygon
N = int(input())
L = list(map(int, input().split()))

L = sorted(L)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

nums=map(int,input().split())

ans=sorted(nums,reverse=True)
#print(ans)

if ans[0]<sum(ans[1:]):
    print("Yes")

else:
    print("No")

Submission status: Accepted

Solution code:
n=int(input())
l = list(map(int, input().split()))
l.sort()
sum=0
for x in l:
    sum+=x

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

Submission status: Accepted

Solution code:
n=int(input())
l = list(map(int, input().split()))
l.sort()
maxi=l[-1]
l[-1]=0
sum=0
for x in l:
    sum+=x

if sum<=maxi:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
input_a = int(input())
input_list = list(map(int, input().split()))
input_list.sort()
sum = 0
for i in range(input_a - 1):
    sum += input_list[i]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int,input().split()))
sortl = sorted(l)
ans = 0
for number in sortl:
         ans += number
if ans - sortl[n-1] > sortl[n-1]:
         print("Yes")
else:
         print("No")

Submission status: Accepted

Solution code:
N = int(input())
inList = [int(s) for s in input().split(" ")]

sumList = 0
maxList = 0
for i in range(N):
    maxList = max(inList[i], maxList)
    sumList += inList[i]

sumList -= maxList
if maxList < sumList:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline

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

m = max(L)
L.remove(m)
if m < sum(L):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
list = input().split(" ")
summa = 0
for i in range(n):
  list[i] = int(list[i])
for i in range(n):
  summa = summa + list[i]
if max(list) < (summa - max(list)):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

maxl = max(l)
l2 = l
l2.remove(maxl)
if maxl < sum(l2):
	print("Yes")
else:
	print("No")

Submission status: Accepted

Solution code:
N = int(input())
LN = [int(x) for x in input().split()]
print('YNeos'[max(LN)>=(sum(LN)-max(LN))::2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

from collections import deque

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

maximum = L.pop()
if maximum < sum(L):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

ml=max(l)
s = sum(l, 0)
if s - ml > ml:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if M >= S:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
n=int(input())
L=list(map(int,input().split()))
wa=sum(L)
for i in range(n):
  if wa-2*L[i]<=0:
    print('No')
    break
    
  if i==n-1:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
x = [int(i) for i in input().split()]
if 2*max(x)<sum(x): print("Yes")
else: print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
K = list(map(int,input().split()))
print("Yes" if sum(K)-max(K) > max(K) else "No")

Submission status: Accepted

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

L.sort(reverse=True)
max_num = L.pop(0)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,*l=list(map(int,open(0).read().split()))
l.sort(reverse=True)
print('Yes' if l[0] < sum(l[1:]) else 'No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
numbers = [x for x in map(int,input().split())]
max = max(numbers)
import numpy as np
maxidx = np.argmax(numbers)
if max < sum(numbers) - max:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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


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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
import copy

inputa = input().split()
# inputb = input().split()
# inputc = input().split()

a = int(inputa[0])
# b = int(inputa[1])
# c = int(inputa[2])

inputb = input().split()
inputbList = [int(x) for x in inputb]
# inputList = list(b)

# x = int(inputb[0])
# y = int(inputb[1])

# inputList=[]
# for i in range(a):
#     inputNum = input().split()
#     inputNum = [int(x) for x in inputNum]
#     inputList.append(inputNum)

# inputList = [int(n) for n in inputList]

# b = [int(n) for n in inputb]
# c = [int(n) for n in inputc]

sum = 0
for i in range(a):
    sum += inputbList[i]

ans = True
for i in range(a):
    tmp = 0
    tmp = sum - inputbList[i]
    if inputbList[i] >= tmp:
        ans = False

if ans == True:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n=int(input())
l=input().split()
d=[]
for i in range(n):
    d.append(int(l[i]))
if 2*max(d)<sum(d):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
i_list = list(map(int,input().split()))
i_list = sorted(i_list)

line_sum = 0
for i in i_list:
  line_sum += i

if max(i_list) < line_sum - max(i_list):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
N=int(input())
arr=list(map(int,input().split()))
s=sum(arr)
if sum([2*a<s for a in arr])==N:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n = int(input())
ln = [int(i) for i in input().split()]

max_ln = max(ln)
ln.remove(max_ln)
sum_ln = sum(ln)
if max_ln < sum_ln:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N=int(input())
hen = list(map(int,input().split()))
hen.sort(reverse=True)
p=sum(hen)-hen[0]
if hen[0]<p:
  print("Yes")
else:
  print('No')

Submission status: Accepted

Solution code:

n = int(input())
values = [int(x) for x in input().split()]
print('Yes'if sum(values) > 2 * max(values) else 'No')

Submission status: Accepted

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

max = -1
sum = 0

for j in range(N):
    sum += L[j]
    if L[j] > max :
        max = L[j]

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

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(int, input().split(' ')))
flag = 0
#print(sum(L))
s = sum(L)
for l in L:
    #print(l)
    if l >= s-l :
        print("No")
        flag = 1
if flag == 0:
    print("Yes")

Submission status: Accepted

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

maxNum = 0
maxIndex = 0
for i, score in enumerate(l):
    if maxNum < score:
        maxNum = score
        maxIndex = i
l.pop(maxIndex)
if sum(l) > maxNum:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

l = list(map(int, input().split()))
thr = sum(l) / 2

for i in range(n):
  if l[i] >= thr:
    print("No")
    break
else: print("Yes")

Submission status: Accepted

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

maxL = L[-1]
resL = L[:-1]

if maxL < sum(resL):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
L = list(map(int, input().split()))
#print(max(L))
a=0
for i in L:
    a+=i
if max(L)<(a-max(L)):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

maxV = max(l)
l.remove(maxV)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:

n = int(input())
Ls = list(map(int, input().split()))
Ls.sort()
large = Ls.pop()
if large < sum(Ls):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
ls = sorted(list(map(int, input().split())))

suml = 0
for l in ls[:-1]:
  suml += l
if suml > ls[-1]:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
N = input()
nums = list(map(int,input().split(" ")))
s = sum(nums)
ma = max(nums)
ss = s - ma
if ma < ss:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(int,input().split()))
print(("No","Yes")[((sum(l)-max(l))-max(l))>0])

Submission status: Accepted

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

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

Submission status: Accepted

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

l.sort()

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

Submission status: Accepted

Solution code:
import math
import sys
import itertools
import queue
from fractions import gcd

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

mod = 1000000007

"""
# 0埋め, 小数点出力桁指定時のときの出力
a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654

# 文字列をリストに格納
char_list = list("abcd") # ["a","b","c","d"]

# 標準入力取得
## 文字列
    = sys.stdin.readline().rstrip()
    = list(sys.stdin.readline().rstrip())

## 数値
    = int(sys.stdin.readline())
    = map(int, sys.stdin.readline().split())
    = list(map(int, sys.stdin.readline().split()))
    = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  # 二次元配列入力　二次元マップみたいな入力のとき
"""

if __name__ == "__main__":
    _ = int(sys.stdin.readline())
    L = list(map(int, sys.stdin.readline().split()))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#117
'''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.'''

n = int(input())
sides = [int(_) for _ in input().split()]
sides.sort()
sidelen = 0
for i in range(n-1):
    sidelen += sides[i]
if sidelen > sides[-1]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
X = list(map(int,input().split()))

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int, input().split()))
lmax = max(l)

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

Submission status: Accepted

Solution code:
y=input()
 
list_1=[int(i) for i in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
lst = list(map(int,input().split()))

ml = max(lst)

if sum(lst)-ml > ml:
	print('Yes')
else:
	print('No')

Submission status: Accepted

Solution code:
n = int(input())
l = map(int,input().split())
m = sorted(l,reverse=True) 

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

Submission status: Accepted

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