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:
k = int(input())
a = 0
data = list(map(int, input().split()))
data = sorted(data)
#print(data)
for num in range(len(data)-1):
    a += data[num]
#print("k is", k)
#print("a is", a)
if data[-1] < 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(maxL)
print('Yes' if maxL < sum(L) else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

N = int(input())
L = np.array([int(s) for s in input().split(' ')])

print('Yes' if np.max(L) < np.sum(L) - np.max(L) else '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:
import sys

def ii2ss(n):
    return [sys.stdin.readline() for _ in range(n)]

def sp2nn(sp, sep=' '):
    return [int(s) for s in sp.split(sep)]

def ss2nn(ss):
    return [int(s) for s in list(ss)]

import functools as ft

def main2(L):
    L.sort()
    lmax = L[-1]
    lothers = ft.reduce(lambda x, y: x + y, L[:-1])
    b = lmax < lothers
    return 'Yes' if b else 'No'

def main(ss):
    L = sp2nn(ss[1])
    s = main2(L)
    print(s)

main(ii2ss(2))

Submission status: Accepted

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

flag = True
for i in range(n):
    if sum(l) - l[i] > l[i]:
        pass
    else:
        flag = False

if flag:
    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[1:]):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())
L = sorted(map(int, input().split()))
#1～N番目を取り出す場合L[N-1]

if L[N-1] >= sum(L) - L[N-1]: #最大要素を引く
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

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

N = int(input())
L = input().split()
L_num = []

for i in range(len(L)):
    L_num.append(int(L[i]))

L_num.sort()

total = 0
for j in range(len(L) - 1):
    total += L_num[j]

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

Submission status: Accepted

Solution code:
#ABC117 B
N = int(input())
Ln = list(map(int, input().split()))
Ln.sort(reverse=True)
max = Ln[0]
sum = sum(Ln)
    
if max < sum - max:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int, input().split()))
l.sort()
if 2 * l[-1] < sum(l):
    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())
sides=[int(i) for i in input().split()]
M=max(sides)
sides.sort()
sides=sides[0:N-1]
K=sum(sides)
if M<K:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

L.sort()

lmax = max(L)
L.pop()
lsum = 0

for i in range(N-1):
    lsum += L[i]

if lsum > lmax:
    print('Yes')
elif lsum <= lmax:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

n = int(input())

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

a.sort()

b = a.pop(-1)
 
if b < sum(a):
    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:
input()
l = sorted(map(int, input().split()))
m=l.pop()
t=sum(l)
print("Yes" if m<t 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())
L = list(map(int, input().split()))

L.sort()

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

Submission status: Accepted

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

l.sort()

max = l[-1]
l_sum = sum(l)

if l_sum - 2*max > 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
_,a=open(0);*a,=map(int,a.split());print('YNeos'[sum(a)<=max(a)*2::2])

Submission status: Accepted

Solution code:
n = int(input())
a = [int(x) for x in input().split()]

a = sorted(a)
b = a.pop(-1)

aa = sum(a)

print('Yes' if aa> b else 'No')

Submission status: Accepted

Solution code:
n = int(input())
a = [ int(i) for i in input().split() ]
a = sorted(a)
if sum(a[:-1]) > a[-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:
a=int(input())
b=list(map(int,input().split()))
if sum(b)>2*max(b):
       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())
ar = list(map(int, input().split()))

try:
	assert 3 <= n <= 10
	assert len(ar) == n
	assert (1 <= min(ar)) and (max(ar) <= 100)
except:
	print("No")
else: 
	if max(ar) < (sum(ar) - max(ar)):
	  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())
L = [int(x) for x in input().split()]

lmax = max(L)
lsum = sum(L) - lmax

if lmax < lsum:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import numpy as np
n = int(raw_input())
l = map(int, raw_input().split())
l = np.array(l)
if np.sum(l) > max(l) * 2:
	print 'Yes'
else:
	print 'No'

Submission status: Accepted

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

x.sort()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())
y = [int(i) for i in input().split(' ')]
if x == len(y):
  ma = max(y)
  del (y[y.index(max(y))])
  other = sum(y)
  if ma - other < 0:
    print('Yes')
  else: 
    print('No')
else:
  print('No')

Submission status: Accepted

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

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

if l_max < l_sum - l_max:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
	n = int(input())
	x = list(map(int, input().split()))
	max_x = 0
	total = 0
	for xi in x:
		total += xi
		if xi > max_x:
			max_x = xi
	if max_x < total - max_x:
		print("Yes")
	else:
		print("No")

if __name__ == '__main__':
    main()

Submission status: Accepted

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

# 出力
ans = 'Yes' if 2 * max(L) < sum(L) else 'No'
print(ans)

Submission status: Accepted

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

L.sort()

if L[-1] < sum(L[:-1]):
  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]:
    ans = "Yes"
else: ans = "No"

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

max_ls = max(ls)

sum_ls = sum(ls)


if sum_ls - max_ls > max_ls :
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
Z = [int(s) for s in input().split()]
if max(Z) < sum(Z)-max(Z):
    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 = input()
l = list(map(int,input().split()))
l.sort(reverse=True)
long = l[0]
l.pop(0)
if long < sum(l):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
input();*a,=map(int,input().split());print("YNeos"[sum(a)<=max(a)*2::2])

Submission status: Accepted

Solution code:
N = int(input())
L = [int(_) for _ in input().split()]
L.sort()
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:
input();*a,b=sorted(map(int,input().split()));print("YNeos"[sum(a)<=b::2])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

import math
import sys
input = sys.stdin.readline

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

L.sort(reverse=True)
longest = L[0]
others = sum(L[1:])

print("Yes" if longest < others else "No")

Submission status: Accepted

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

Submission status: Accepted

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

l_max = max(L)
L.remove(l_max)

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    *L, = map(int, input().split())
    maxi = L.pop(L.index(max(L)))
    accum = 0
    for i in L:
        accum += i
    if maxi < accum:
        print("Yes")
    else:
        print("No")

main()

Submission status: Accepted

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


hen.sort()
a=sum(hen)
b=a-int(hen[n-1])
if hen[n-1]>=b:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
n = input()

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

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

n = ni()
li = na()
print("Yes" if max(li) < sum(li) - max(li) else "No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())  # N角形が作りたい

L = list(map(int, input().split()))  # それぞれの変の長さ
L.sort(reverse=True)

max_L = L[0]

sum = 0
for i in range(1, len(L)):
    sum += L[i]

if max_L < sum:
    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())
Ls = [int(x) for x in input().split()]

L = max(Ls)
ans = L < (sum(Ls) - L)

print("Yes" if ans else "No")

Submission status: Accepted

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


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

Submission status: Accepted

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

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:
N = input()
L = [int(x) for x in input().split()]

max_l = max(L)

if 2*max_l < sum(L):
    ans = 'Yes'
else:
    ans = 'No'

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

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

a.sort()

if a.pop() < sum(a):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n=int(input())
l=sorted(list(map(int,input().split())))
length=0
for i in range(len(l)-1):
  length+=l[i]
if length>l[-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)
if(Max >= sum(L)):
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

L = sorted(L)
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 = sorted(L)
m = L.pop(-1)
if sum(L) > m:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
#encoding: utf-8

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(raw_input())
L = map(int, raw_input().split())
L.sort()

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

sum = 0

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

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

Submission status: Accepted

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

sum = 0

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

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

Submission status: Accepted

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

def main():
    L_sum = 0
    L_max = 0
    for l in L:
        if l > L_max:
            L_max = l
        L_sum += l
    if L_max < L_sum - L_max:
        return 'Yes'
    else:
        return 'No'

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

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())
li = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
n = int(input())
li = list(map(int, input().split()))
a = max(li) < sum(li)-max(li)

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

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int,input().split()))
a = max(l)
l.remove(a)
b = 0
for i in range(len(l)):
    b += l[i]
if a < b:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

l_max = max(L_list)
del L_list[L_list.index(l_max)]
if l_max < sum(L_list):
    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):
  L[i+1:], L[i] ,L[:i]
  if sum(L[i+1:]+L[:i]) <= L[i]:
    ans = "No"
print(ans)

Submission status: Accepted

Solution code:
n,*p=map(int,open(0).read().split())
p=sorted(p)
if sum(p[:-1])>p[-1]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(int,input().split()))
a=sum(l)
ans='Yes'
for i in l:
  if a-i<=i:
    ans='No'
print(ans)

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

Submission status: Accepted

Solution code:
N = int(input())
length = list(map(int,input().split()))
l1 = max(length)
sum = 0
for i in length:
    sum += i
if 2*l1 < sum:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = map(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())
ls = [int(i) for i in input().split()]

l = max(ls)
ls.remove(l)
if l >= sum(ls):
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
# Polygon
N = int(input().strip())
L = list(map(int, input().strip().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());*A,=map(int,input().split());print("YNeos"[sum(A)<=max(A)*2::2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
lists=list(map(int,input().split()))
a=1
b=0
for i in range (1,n+1):
  b=b+lists[i-1]
for j in range (1,n+1):
  if 2*lists[j-1]>=b:
    a=0
if a==0:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

maxlen = max(L)
L.remove(max(L))

if sum(L) > maxlen:
    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:
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()))
if sum(l)>max(l)*2:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
a = int(input())
b = sorted(list(map(int,input().split())),reverse=True)
if sum(b)-2*b[0]>0:
    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()
    if L[-1] < sum(L[:-1]):
        print(YES)
    else:
        print(NO)
    return


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()]
max_l = max(l_list)
sum_l = sum(l_list) - max_l*2
if sum_l > 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#117
n = int(input())
a = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
N = int(input())
X = [int(i) for i in input().split()]
print("Yes" if max(X) < sum(X)-max(X) else "No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
number = input()
lines = [int(x) for x in input().split(" ")]

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

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(int,input().split()))
L.sort()
A_theorem = sum(L) - L[N-1]
if A_theorem > L[N-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)
maxidx = L.index(lmax)

suml = 0
for i in range(N):
    if i != maxidx:
        suml += L[i]
        
if lmax < suml:
    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)
print('Yes' if Lmax < sum(L) else 'No')

Submission status: Accepted

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

m = max(l)
s = 0

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

s = s - m

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(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')

Submission status: Accepted

Solution code:
n=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 = list(map(int, input().split()))
m = l[:]
c = 0

for i in range(n):
    m.remove(m[i])
    if l[i] >= sum(m):
        c = 1
        break
    m = l[:]

if c == 1:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

if __name__ == "__main__":
    N = int(input())
    L=map(int, input().strip().split())
    L=sorted(L)
    s = sum(L[:-1])
    if s > L[-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 sum(l[:-1]) > l[-1]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
Ls=input().split()#str
L=[int(i) for i in Ls]
mx=max(L);L.remove(mx)
all=0
for j in L:all+=j
if all>mx:print("Yes")
else:print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

n = int(input())

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

for i in range(n):
    if l[i] >= sum(l) - l[i]:
        print("No")
        sys.exit()

print("Yes")

Submission status: Accepted

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