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:
#!usr/bin/env python3
from collections import defaultdict
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007
#A
def A():
    t,x = LI()
    print(t/x)

#B
def B():
    n = I()
    a = LI()
    m = max(a)
    if m >= sum(a)-m:
        print("No")
    else:
        print("Yes")


#C
def C():
    n,m = LI()
    x = LI()
    x.sort()
    l = [x[i+1]-x[i] for i in range(m-1)]
    l.sort()
    l = l[::-1]
    ans = sum(l[max(n-1,0):])
    print(ans)

#D
def D():
    n,k = LI()
    a = LI()
    k = list(map(int,list(bin(k)[2:])))
    l = len(k)
    for i in range(n):
        a[i] = list(map(int,list(bin(a[i])[2:])))
        l = max(l,len(a[i]))
    for i in range(n):
        for j in range(l-len(a[i])):
            a[i].insert(0,0)
    for j in range(l-len(k)):
        k.insert(0,0)
    s = [[0,0] for i in range(l)]
    pow2 = [1 for i in range(l)]
    for i in range(l-1)[::-1]:
        pow2[i] = pow2[i+1]*2
    for i in a:
        for j in range(l):
            s[j][0] += pow2[j]*i[j]
            s[j][1] += pow2[j]*(not i[j])
    dp = [0 for i in range(l+1)]
    small = False
    for i in range(l):
        if not small:
            if not k[i]:
                dp[i+1] += dp[i]+s[i][0]
            else:
                if s[i][0] >= s[i][1]:
                    dp[i+1] += dp[i]+s[i][0]
                    small = True
                else:
                    dp[i+1] += dp[i]+s[i][1]
        else:
            dp[i+1] += dp[i]+max(s[i])
    print(dp[l])

#E
if __name__ == "__main__":
    B()

#F

#G

#H

#I

#J

#K

#L

#M

#N

#O

#P

#Q

#R

#S

#T

Submission status: Accepted

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

for i in range(N):
  L[i] = int(L[i])
  
L.sort()
Longest = L.pop(-1)
if(sum(L) > Longest):
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
size = int(input())
sides = input().split()
ss = []
for x in sides:
  ss.append(int(x))
big = max(ss)
together = sum(ss)
if(big < together-big):
	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)
o = sum(l) - m

print("Yes" if m<o else "No" )

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())

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

max_index = np.argmax(np.array(L))

total = 0

for i in range(N):
    if i != max_index:
        total += L[i]

if total > L[max_index]:
    print("Yes")
else:
    print("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())
L = list(map(int, input().split()))

max_l = max(L)
sum_l = sum(L)

if max_l < (sum_l - max_l):
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
n = int(input())
l = sorted(list(map(int,input().split())),reverse=True)
if l[0] < sum(l[1:]):
    print('Yes')
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)-l[0]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys

N = int(input())
L = sys.stdin.readline().strip().split()
L = [int(l) for l in L]
L.sort(reverse=True)
max_L = int(L.pop(0))
sum_L = sum(int(i) for i in L)
if(max_L<sum_L):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

longest = sorted(l)[::-1][0]
if sum(l) - longest > longest:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
N = int(input())
#print(N)
a = list(map(int, input().split()))
b = sorted(a)
#print(b[:2])
lng = sum(b[:N-1])
if lng > b[N-1]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())

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

L.sort()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys

YES = "Yes"  # type: str
NO = "No"  # type: str

def solve(N: int, L: "List[int]"):
    L.sort(reverse=True)
    print(YES) if(L[0] < sum(L[1:])) else print(NO)
    return


# Generated by 1.1.3 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    L = [ int(next(tokens)) for _ in range(N) ]  # type: "List[int]"
    solve(N, L)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(int,input().split()))
ans = "Yes"
for i in range(N):
  if(L[i] >= sum(L[:i]+L[i+1:])):
    ans = "No"
print(ans)

Submission status: Accepted

Solution code:
N = input()
L = [int(i) for i in input().split()]
L.sort()
max_L = L[-1]
# print(max_L)
other_L = sum(L[:-1])
# print(other_L, max_L)
# print(other_L > max_L)
if other_L > max_L:
    print("Yes")
else:
    print("No")

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:
def main():
    n, ls = get_params()
    print(to_answer(is_drawable(ls)))


def get_params():
    n = int(input())
    ls = [int(s) for s in input().split()]
    return n, ls


def to_answer(b):
    return "Yes" if b else "No"


def is_drawable(ls):
    maximum = max(ls)
    return maximum < sum(ls) - maximum


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main():
    n, ls = get_params()
    print(to_answer(is_drawable(ls)))


def get_params():
    n = int(input())
    ls = [int(s) for s in input().split()]
    return n, ls


def to_answer(b):
    return "Yes" if b else "No"


def is_drawable(ls):
    ls_copy = ls.copy()
    maximum = max(ls_copy)
    ls_copy.remove(maximum)
    return maximum < sum(ls_copy)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
L = [int(x) for x in input().split()]
max_L = max(L)
idx_max_L = L.index(max_L)
rest_sum_L = 0
for i in range(N):
  if i != idx_max_L:
    rest_sum_L += L[i]

if rest_sum_L > max_L:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(int(i) for i in input().split())
max = 0
sum = 0
for i in a:
  if i > max:
    sum = sum + max
    max = i
  else:
    sum = sum + i
if max >= sum:
  print('No')
else:
  print('Yes')

Submission status: Accepted

Solution code:
n = int(input())
List=[int(i) for i in input().split()]
a = max(List) #sortよりmaxとsumのほうが楽
b = sum(List)
print('Yes' if a<b-a else 'No') #1行で書ける

Submission status: Accepted

Solution code:
N=int(input())
a=list(input().split())
s=0
for i in range(N):
    a[i]=int(a[i])
    s+=a[i]
a.sort()
if s>2*a[N-1]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())
D = [int(_) for _ in input().split()]
a = max(D)
b = sum(D)
if a < b - a:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

N = int(input())
Llist = [int(x) for x in input().split()]
Llist.sort()
Llist.reverse()
if sum(Llist) > 2*Llist[0]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

N = int(input())
Llist = [int(x) for x in input().split()]
Llist.sort()
if sum(Llist) > 2*Llist[-1]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

if __name__ == '__main__':
	main()

Submission status: Accepted

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

if sum(L) > 2 * L[-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)/2 :
    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:
_=input()
L=sorted(map(int,input().split()))
print('Yes' if L[-1]*2<sum(L) else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def ans():
  N = int(input())
  L = list(map(int,input().split()))
  tmp = "Yes"
  for i in range(N):
    if(L[i] >= sum(L[:i]+L[i+1:])):
      tmp = "No"
  print(tmp)
ans()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc117/tasks/abc117_b
n = int(input())
a = [int(x) for x in input().split()]
a.sort()
print("Yes") if a[-1] < sum(a[:len(a) - 1]) else print("No")

Submission status: Accepted

Solution code:
N = int(input())
Li = list(map(int, input().split()))
Li.sort()
total = sum(Li[:-1])
if Li[-1] < total:
    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 = eval(input())
l = list(map(int,input().split()))

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

Submission status: Accepted

Solution code:
n = int(input())
l = map(int, input().split())
s = 0
t = 0
for x in l:
  s += x
  t = max(x, t)
if s>2*t:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
def polygon(N: int, L: list) -> bool:
    max_l = max(L)
    return max_l < sum(L) - max_l


if __name__ == "__main__":
    N = int(input())
    L = [int(s) for s in input().split()]

    ans = polygon(N, L)
    print('Yes' if ans else 'No')

Submission status: Accepted

Solution code:
N = int(raw_input())
sides = map(int, raw_input().strip().split())

m = max(sides)
sides.remove(m)

if m < sum(sides):
  print 'Yes'
else:
  print 'No'

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
_ = int(input())
L = list(map(int, input().split()))
print('YNeos' [max(L) >= sum(L)-max(L)::2])

Submission status: Accepted

Solution code:
N = int(input())
listL = [int(i) for i in raw_input().split()]
maxL = max(listL)
sum = 0
for i in range(N):
    sum = sum + listL[i]

sum = sum - maxL

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
inputPolygonNum = int(input())
inputLengthList = input().split(" ")
intInputLengthList = [int(s) for s in inputLengthList]
intInputLengthList.sort(reverse = True)
if inputPolygonNum > 2:
    maxLength = intInputLengthList.pop(0)
    for i in intInputLengthList:
        maxLength = maxLength - i
    if(maxLength < 0):
        print("Yes")
    else:
     print("No")   
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

max = max(L)
L.remove(max)
sum = 0
for l in L:
    sum += l
ans = "No"
if (max < sum):
    ans = "Yes"

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
l = [int(i) for i in input().split()]
bgr = max(l)
l.remove(bgr)
if(bgr<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[n-1]<sum(l[:n-1]):
        print('Yes')
else:
        print('No')

Submission status: Accepted

Solution code:
#%%
import numpy as np

#%%
n = int(input())

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

maxid = np.argmax(arr)

if arr[maxid] < np.sum(arr) - arr[maxid]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = int(input())
polygon = [int(part) for part in input().split()]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
L_arr = [int(x) for x in input().split()]

L_arr.sort(reverse=True)

L_other = 0
for L in L_arr[1:]:
    L_other += L

if L_other > L_arr[0]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
ka = int(input())
line = list(map(int, input().split(" ")))
long = max(line)
line.remove(long)
if long < sum(line):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n=int(input())
li=list(map(int,input().split()))
li.sort()
sum=0

#print(li)
for i in range (n-1):
  #print(li[i])
  sum=sum+li[i]
  #print(sum)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input()
l=[int(i) for i in input().split()]
print(["No","Yes"][max(l)<sum(l)-max(l)])

Submission status: Accepted

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

lmax = max(L)
L.remove(lmax)

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

Submission status: Accepted

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

if l_s[0] < sum(l_s[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)
if(m<sum(l)):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n=input()
N=int(n)-1
a=input().split()
A= [int(s) for s in a]
A.sort()
if A[N] < sum(A)-A[N]:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
N = int(input())
A = sorted([int(i) for i in input().split()])
if (sum(A) - A[-1]) > A[-1]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
length = 0
count = 0
for i in range(N):
  length += A[i]
for i in range(N):
  if A[i] >= (length)/2:
    count = 1
print('Yes' if count == 0 else 'No')

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int,input().split()))
l.sort()
lmax = max(l);num = 0
for i in range(n-1):
    num += l[i]
if num > lmax:print('Yes')
else:print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
L = input().split()
npL = np.array([int(l) for l in L])
l_max = npL.max()
arg_max = np.argmax(npL)
l_deleted = np.delete(npL, arg_max)
if l_max < l_deleted.sum():
    print("Yes")
else:
    print("No")

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:
import numpy as np
n = int(input())
a = list(map(int, input().split()))

index = np.argmax(a)
max_value = a[index]
print("Yes" if max_value < np.sum(np.delete(a, index)) else "No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(int,input().split()))
max = -1
maxIndex=-1

index=0
for value in L:
    if max < value:
        max = value
        maxIndex = index
    index+=1

total=0
index=0
for value in L:
    if index != maxIndex:
        total+=value
    index+=1

if total > max:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
data = int(input())
score = [int(s) for s in input().split()]
md = max(score)
mi = score.index(md)
s2 = score.remove(md)
s = sum(score)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def main():
    """ Code implementation """
    N = int(input())
    L = list(map(int, input().split()))
    longest = 0
    sum = 0
    for l in L:
        sum = sum + l
        if longest < l:
            longest = l
        
    if longest < (sum - longest):
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
L=list(map(int,input().split()))
L.sort()
Lmax=L.pop(-1)
Lsum=sum(L)
if Lmax < Lsum:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python
# coding: UTF-8

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

Edgelist = EdgeList.sort(reverse=True)

if EdgeList[0] < sum(EdgeList[1:]):
    print("Yes")
else:
    print("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()))
max_L = max(L)
L.remove(max_L)
if max_L < sum(L):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
def test():
    N = int(input())
    L = list(int(x) for x in input().split())
    longest = max(L)
    others = sum(L) - longest
    if longest < others:
        print("Yes")
    else:
        print("No")
test()

Submission status: Accepted

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

Submission status: Accepted

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

if sum(ll[:-1]) > ll[-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 = input().split()

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

c = 0

for i in l:
	if i >= (sum(l) - i):
		c += 1
    
if c == 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
n = int(input())
lengths = list(map(int, input().split(' ')))
total = 0
longest = 0
for i in lengths:
  total += i
  if (i > longest):
    longest = i
possible = True
if (total - longest) <= longest:
    possible = False
   
if possible:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

total = sum(L)
for i in range(N):
  if total - L[i] > L[i]:
    continue
  else:
    print('No')
    break
else:
  print('Yes')

Submission status: Accepted

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

largest = max(l)
l.remove(largest)

total = sum(l)

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

Submission status: Accepted

Solution code:
def main(N, Ls):
    L_max = max(Ls)
    L_sum = sum(Ls) - L_max
    if L_max < L_sum:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main(int(input()), list(map(int, input().split(' '))))

Submission status: Accepted

Solution code:
N = int(input())
Ls = sorted(list(map(float,input().strip().split())))
maxl = Ls[len(Ls) -1]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
lines = [int(x) for x in input().split()]
lines = sorted(lines)
if lines[-1] < sum(lines[:-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()))

lmax = max(l)
l.remove(lmax)

out_flag = False

if lmax < sum(l):
    out_flag = True

def out(x):
    if x:
        print("Yes")
    else:
        print("No")

out(out_flag)

Submission status: Accepted

Solution code:
#cording: utf-8

N = int(input())

L = list(map(int, input().split()))
max_val = max(L)
max_ind = 0
max_ind = L.index(max_val)
del L[max_ind]

sum_val = 0
for i in range(len(L)):
    sum_val += L[i]

if max_val < sum_val:
    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 = input()
l = list(map(int, input().split()))

b = max(l)
s = sum(l)

if b < s - b:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())
L = [int(str) for str in input().split()]
L.sort(reverse = True)
if L[0] >= sum(L[1:]):
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
_ = input()
n = [int(i) for i in input().split()]
print("YNeos"[0>=sum(n)-max(n)*2::2])

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(reverse=True)
sum = 0
for i in range(1,N,1):
  sum += L[i]
if sum > L[0]:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

if m < l:
    print("Yes")

else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(int,input().split()))
L.sort()
max = L[-1]
all_sum = sum(L[:-1])

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

Submission status: Accepted

Solution code:
def solve(string):
    n, *l = map(int, string.split())
    l= sorted(l)
    return "Yes" if sum(l[:-1]) > l[-1] else "No"


if __name__ == '__main__':
    print(solve("\n".join([input(), input()])))

Submission status: Accepted

Solution code:
def solve(string):
    l = map(int, string.split())
    l= sorted(l)
    return "Yes" if sum(l[:len(l)-1]) > l[-1] else "No"


if __name__ == '__main__':
    input()
    print(solve(input()))