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()))

max_index = l.index(max(l))
cnt = 0
for i in range(len(l)):
    if not  i == max_index:
        cnt += l[i]
if cnt > 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 sum(l)-max(l)>max(l) else "No")

Submission status: Accepted

Solution code:
n = int(input())
l = sorted(list(map(int, input().split())))
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()))
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(reverse=True)
ln = L.pop(0)
if ln < sum(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()))

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

Submission status: Accepted

Solution code:
N = int(input())
length = list(map(int,input().split()))
length.sort(reverse=True)
length_max=length[0]
length_others=sum(length[1:])
if length_others>length_max:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N=int(input())
l=list(map(int,input().split()))
l.sort(reverse=True)
total=0
for i in range(1,N):
  total+=l[i]
if l[0]<total:
  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:
out=["No","Yes"]
n=int(input())
li=list(map(int,input().split()))
print(out[max(li)*2<sum(li)])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

# https://atcoder.jp/contests/abc117


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

    L = sorted(L, reverse=True)

    if L[0] < sum(L[1:]):
        return "Yes"
    else:
        return "No"


print(main())

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 = [int(i) for i in input().split()]
L = max(l)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
N = int(input())
array = list(map(int,input().split()))
if not (3 <= N <= 10): sys.exit()
if not (min(array) >= 1 and max(array) <= 100): sys.exit()

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

Submission status: Accepted

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

l.sort()
cnt = 0
for i in range(n-1):
	cnt += l[i]
if cnt > 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[-1] < sum(L[:N-1]):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())
L = sorted([int(X) for X in input().split()])
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()))
a=max(l)
b=0
for i in range(n):
  b+=l[i]
b=b-a
if a<b:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

import sys

def main():
    input = sys.stdin.readline
    n = input()
    l = list(map(int, input().split()))
    max_l = max(l)
    l.remove(max_l)
    sum_l = sum(l)
    if max_l < sum_l:
        print("Yes")
    else:
        print("No")
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
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:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

_ = ri()
a = sorted(rl())
if sum(a[:-1]) > a[-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[:n - 1]) > 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[-1]<sum(l[:-1]):
  print('Yes')
  
else:
  print('No')

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
_,*l=map(int,open(0).read().split())
l.sort()
print("YNeos"[sum(l[:-1])<=l[-1]::2])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


n = I()
l = LI()
max_l = max(l)
max_i = l.index(max(l))
l.pop(max_i)
if max_l < sum(l):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = int(input())

l = list(map(int,input().split()))
hen = 0
l.sort(reverse=True)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
N = I()
L = LI()
x = max(L)
L.sort()
L[-1] = 0
y = sum(L)
if x < y:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.read
readline = sys.stdin.buffer.readline
INF = float('inf')


def main():
    N = int(readline())
    L = list(map(int, readline().split()))

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from collections import deque,Counter
import numpy as np
import math
sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())

def Main():
    n = I()
    l = list(IL())
    m = max(l)
    s = sum(l)-m
    if m<s:
        print('Yes')
    else:
        print('No')
    return

if __name__=='__main__':
    Main()

Submission status: Accepted

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

M = max(L)
S = sum(L) - M

print('Yes' if M < S else 'No')

Submission status: Accepted

Solution code:
def main():
    n=int(input())
    l=sorted(map(int,input().split()))
    print("Yes" if l[-1] < sum(l[:-1]) else "No")
    
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
import itertools
# import numpy as np
import time
import math
import heapq
 
sys.setrecursionlimit(10 ** 7)
 
from collections import defaultdict
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

# map(int, input().split())
# list(map(int, input().split()))

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

mx = L[0]
idx = 0
for i in range(N):
    if L[i] > mx:
        mx = L[i]
        idx = i

if mx < sum(L[i] for i in range(N) if i != idx):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
#import sys
#import numpy as np
import math
#import itertools
#from fractions import Fraction
#import itertools
from collections import deque
from collections import Counter
#import heapq
#from fractions  import gcd
#input=sys.stdin.readline
#import bisect
n=int(input())
l=list(map(int,input().split()))
m=max(l)
if 2*m<sum(l):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

m = max(ls)
s = sum(ls)

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

Submission status: Accepted

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

Submission status: Accepted

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

a1 = sorted(a)
if((sum(a1)-a1[-1]) > a1[-1]):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
ls = [int(num) for num in input().split()]

ls.sort(reverse=True)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

max_L = max(L)
max_i = L.index(max(L))

sum_without_max = sum([*L[:max_i], *L[max_i+1:]])

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

Submission status: Accepted

Solution code:
N = int(input())

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

m = max(L)

d = sum(L)-m

print("Yes" if d > m else "No")

Submission status: Accepted

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

max_input=max(input_list)
Sum_input=sum(input_list)-max_input
if max_input<Sum_input:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int,input().split()))
s = sum(l) - max(l)
if s > 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()
A = list(map(int, input().split()))

M = max(A)
S = sum(A) - M

if M < S:
  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[:-1]):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
L = list(map(int,input().split()))
L = sorted(L)
s = sum(L[:n-1])
if L[-1] < s:
    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 sum(l)-m>m 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()))

# print(n)
# print(l)

l_s = sorted(l, reverse=True)

# print(l_s)

longest = l_s.pop(0)

# print(longest)
# print(l_s)

if longest < sum(l_s):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
L=list(map(int,input().split()))
a=sum(L)
flag=True
for i in range(N):
  if a<=2*L[i]:
    flag=False
    break
if flag:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
input()
a, *b = sorted(map(int, input().split()), reverse=True)
print('Yes' if a < sum(b) 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())

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

L = sorted(L,reverse=True)
#print(L)
#print(sum(L)) 
if sum(L)-L[0]*2>0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

def check(l):
    return 'Yes' if max(l) < sum(l) - max(l) else 'No'

print(check(l))

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int, input().split()))
tot = sum(l)
flag = True
for l_i in l:
  if 2 * l_i >= tot:
    flag = False
    break
if flag:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
n = int(input())
L = list(map(int,input().split()))
L2 = sorted(L)
L3 = sum(L) - L2[n-1]
if(L3 > L2[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 = [int(x) for x in 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:
n=int(input())
s=list(map(int,input().split()))
x=max(s)
y=sum(s)
       
if y>2*x:
       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(reverse = True)
if L[0] < sum(L[1:]):
    print('Yes')
else:
    print("No")

Submission status: Accepted

Solution code:
N=int(input())
AA=list(map(int,input().split()))
Lmax=0
for i in range(N):
    Lmax = max(Lmax,AA[i])
print("Yes" if Lmax<(sum(AA)-Lmax) else "No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = int(input())
input_line = list(map(int,input().split(' ')))
input_line.sort()
large = input_line.pop(-1)
if(sum(input_line)>large):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = int(input())

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

lis = sorted(lis)

m = max(lis)

oth = sum(lis[:n-1])

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

Submission status: Accepted

Solution code:
def actual(n, L):
    max_l = max(L)
    others_l = sum(L) - max_l

    if max_l < others_l:
        return 'Yes'

    return 'No'

n = int(input())
L = list(map(int, input().split()))
print(actual(n, L))

Submission status: Accepted

Solution code:
# abc117_b.py
def sums(a, l):
    return sum(a)-2*l


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

Submission status: Accepted

Solution code:
def linp():return list(map(int,input().split()))

n=int(input())
l=linp()
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())))
last = L.pop(N - 1)
if last < sum(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) > max(l):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
N=int(input())
L=list(map(int,input().split()))
c=sum(L)
for i in range(N):
  if L[i]>=c-L[i]:
    print("No")
    sys.exit()
print("Yes")

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())
a=[int(i) for i in input().split()]
b=sorted(a)
x=sum(b[-1:])
y=sum(b[:-1])
if y>x:
	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(N-1):
  sum += L[i+1]
  
if L[0] < 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())
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()))
if max(L)*2 - sum(L) < 0:
    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 = 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())
x = tuple(sorted(map(int, input().split())))
y = sum(x[:-1])
if x[-1] < y:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n=int(input())

p=list(map(int, input().split()))
pm=max(p)
p.remove(pm)
if pm<sum(p):
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
import sys
import math
from collections import Counter
import itertools
import fractions
import datetime
from decimal import Decimal
#from functools import reduce

# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")

# ###########################################

N=II()
L = LI()

L.sort()

if sum(L) - L[-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)<sum(l)-max(l) else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

m = L.pop(L.index(max(L)))
if sum(L) > m:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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


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

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

Submission status: Accepted

Solution code:
import sys
N = int(sys.stdin.readline().rstrip())
L = list(map(int, sys.stdin.readline().rstrip().split()))
l_max = max(L)
l_sum = sum(L)
if l_max < l_sum - l_max:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

max = max(list)
sum = sum(list)

if sum > 2*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('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
number = int(input())

sides = [int(val) for val in input().split(' ')]

longest = max(sides)
all = sum(sides)

if longest < all - longest:
  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[n-1]:
	print("Yes")
else:
	print("No")

Submission status: Accepted

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

Submission status: Accepted

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


resolve()

Submission status: Accepted

Solution code:
N=int(input())
A=sorted(map(int,input().split()))
ans=0
for i in range(N-1):
  ans+=A[i]

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

Submission status: Accepted

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

max_l = max(l)

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()))

maxl = max(l)
maxli = l.index(maxl)
del l[maxli]

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

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(int, input().split()))
L_max = max(L)
if sum(L) > 2*L_max:
    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()))
M = max(l)
L = sum(l)-M
if L > M:
    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 = list(map(int,input().split()))

longest =max(l)

index = l.index(longest)

total = 0
for i in range(n):
    if i!=index:
        total+=l[i]

if longest<total:
    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())
list = list(map(int, input().split()))
print("Yes" if 2*max(list) < sum(list) else "No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

dec = max(S)
total = 0

for i in S:
  total += i
total -= dec
if total > dec:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

M = L.pop()
if M < sum(L):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Max = l[0]
for i in range(n):
	if Max < l[i]:
		Max = l[i]
		
l.remove(Max)
s = sum(l)
if Max < s:
	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=input()
*l,a=sorted(map(int,input().split()))
if sum(l)>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:
N = int(input())
L = input().split()
max = 0
count = 0

for i in range(N):
  count += int(L[i])
  if max < int(L[i]):
    max = int(L[i])
    
if count > 2*max:
  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("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n = int(input())
A = [int(x) for x in input().split()]
A.sort()
s = 0
for i in range(n-1):
    s += A[i]
if A[-1] < s:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())
L = [int(x) for x 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())
l = input().split(" ")
for i in range(len(l)):
    l[i] = int(l[i])

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

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

Submission status: Accepted

Solution code:
n = int(input())
l = list( map(int,input().split()))
m = max(l)
s = sum(l)
if 2*m < s:
    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')