Problem:


﻿Score: 100 points

Problem Statement

In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.

Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.

Determine if there exists a pair of antennas that cannot communicate directly.

Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.  

Constraints

a, b, c, d, e and k are integers between 0 and 123 (inclusive).

a < b < c < d < e

Input

Input is given from Standard Input in the following format:

a
b
c
d
e
k

Output

Print :( if there exists a pair of antennas that cannot communicate directly, and print Yay! if there is no such pair.

Sample Input 1

1
2
4
8
9
15

Sample Output 1

Yay!

In this case, there is no pair of antennas that cannot communicate directly, because:

the distance between A and B is 2 - 1 = 1

the distance between A and C is 4 - 1 = 3

the distance between A and D is 8 - 1 = 7

the distance between A and E is 9 - 1 = 8

the distance between B and C is 4 - 2 = 2

the distance between B and D is 8 - 2 = 6

the distance between B and E is 9 - 2 = 7

the distance between C and D is 8 - 4 = 4

the distance between C and E is 9 - 4 = 5

the distance between D and E is 9 - 8 = 1

and none of them is greater than 15. Thus, the correct output is Yay!.

Sample Input 2

15
18
26
35
36
18

Sample Output 2

:(

In this case, the distance between antennas A and D is 35 - 15 = 20 and exceeds 18, so they cannot communicate directly.
Thus, the correct output is :(.



Sample input:
1
2
4
8
9
15


Sample output:
Yay!

Submission status: Runtime Error

Solution code:
a=list(map(int,[input() for i in range(5)]))
k=int(input())
for i in range(5):
  if (a[i+1]-a[i]) > k:
    b=":("
    print(b)
    exit()
  else:
    b="Yay!"
print(b)

Submission status: Runtime Error

Solution code:
a=[input() for i in range(5)]
k=input()
for i in range(4):
  if a[i+1]-a[i]>k:
    b=":("
    print(b)
    exit()
  else:
    b="Yay!"
print(b)

Submission status: Runtime Error

Solution code:
a=list[input() for i in range(5)]
k=input()
for i in range(4):
  if a[i+1]-a[i]>k:
    b=":("
    print(b)
    exit()
  else:
    b="Yay!"
print(b)

Submission status: Runtime Error

Solution code:
a=list(input() for i in range(5))
k=input()
for i in range(4):
  if a[i+1]-a[i]>k:
    b=":("
    print(b)
    exit()
  else:
    b="Yay!"
print(b)

Submission status: Runtime Error

Solution code:
a=list(input(), for i in range(5))
k=input()
for i in range(4):
  if a[i+1]-a[i]>k:
    b=":("
    print(b)
    exit()
  else:
    b="Yay!"
print(b)

Submission status: Runtime Error

Solution code:
a,b,c,d,e,k=map(int,input().split())
if e-a>k:
  print(":(")
else:
  print('Yay!')

Submission status: Runtime Error

Solution code:
x = []
for i in range(5):
	x.append(int(input()))

if max(x)-min(x) <= int(input()):
	print('Yay!')
else:

Submission status: Runtime Error

Solution code:
posi_list = []
for _ in range(5):
  posi_list.append(int(input()))
k = int(input())

flag=True
for i in range(5):
  temp_posi_list = posi_list.copy()
  posi = temp_posi_list[i]
  del temp_posi_list[i]
  temp_posi_list = np.array(temp_posi_list)
  max_dist = max(np.abs(temp_posi_list - posi))
  if max_dist > k:
    flag=False
    break
if flag:
  print("Yay!")
else:
  print(":(")

Submission status: Runtime Error

Solution code:
A = [input() for i in range(6)]
X = map(int, A)
a = X[0]
e = X[4]
k = X[5]
if e-a > k:
    print(":(")
else:
    print("Yay!")

Submission status: Runtime Error

Solution code:
A = [input() for i in range(6)]
a, b, c, d, e, k = A
B = [a-b, a-c, a-d, a-e,b-c,b-d,b-e,c-d,c-e,d-e]
for i in range(10):
    if abs(B[i]) > k:
        print(":(")
        break
else:
    print("Yay!")

Submission status: Runtime Error

Solution code:

xs = [int(input()) for _ in range(5)]
k = int(input())

ok = True
for x in xs:
    for y in ys:
        if abs(x-y) > k:
            ok = False

print("Yay!" if ok else ":(")

Submission status: Runtime Error

Solution code:
s = [input() for i in range(6)]
if s[4]-s[0]>s[5]:
  print(":(")
else:
  print("Yay!")

Submission status: Runtime Error

Solution code:
X,Y,Z,K = map(int, input().split())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]
     
a.sort(reverse = True)
b.sort(reverse = True)
c.sort(reverse = True)
     
li = []
for i in range(len(a)):
    for j in range(len(b)):
        li.append(a[i]+b[j])
    
li.sort(reverse = True)
     
li1 = []
for i in range(len(li)):
    for j in range(len(c)):
        li1.append(li[i]+c[j])
        if j > k:
          break
li1.sort(reverse = True)
n = 1
while n < K+1:
    print(li1[n-1])
    n += 1

Submission status: Runtime Error

Solution code:
antenna = []
for i in range(5):
  antenna[i] = int(input())
k = int(input())
if k < max(antenna) - min(antenna):
  print("Yay!")
else:
  print(":(")

Submission status: Runtime Error

Solution code:

A = [0, 0, 0, 0, 0]
A[0] = int(input())
A[1] = int(input())
A[2] = int(input())
A[3] = int(input())
A[4] = int(input())
k = int(input())

flg = 0

for i in range(4):
    for j in range(i+1, 5, 1)
        if k < (A[j] - A[i]):
            flg = 1
            print(":(")
            break

if flg == 0:
    print("Yay!")

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
r = [b-a,c-b,d-c,e-d]
count = 0
for rr in r:
  if rr > k:
    count += 1
print(count

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if e - a <= k:
  print('Yey)
else:
  print(':)')

Submission status: Runtime Error

Solution code:
import math
N = int(input())
neck = int(input())
for i in range(N-1):
  neck = min(neck, int(input()))
res = math.ceil(N/neck)
print(res)

Submission status: Runtime Error

Solution code:
a=[int(input()) for i in range(5)]
k=int(input())
if abs(a[0]-a[5])>k:
  print(":(")
else:
  print("Yay!")

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
a=[]
ans="Yay!"
for _ in range(6):
  a.append(int(input()))
for i in range(5):
  for j in range(i+1,5):
    if abs(a(i)-a(j))>a(5):
      ans=":("
      break
print(ans)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
a=[]
ans="Yay!"
for _ in range(6):
  a.append(int(input()))
for i in range(5):
  for j in range(i+1,5):
    if abs(a.append(i)-a.append(j))>a.append(5):
      ans=":("
      break
print(ans)

Submission status: Runtime Error

Solution code:
a,b,c,d,e,k = map(int,input().split())
 
if e - a > k:
	print(":(")
else:
	print("Yay!")

Submission status: Runtime Error

Solution code:
a,b,c,d,e,k = map(int,input().split())

if e - a > k:
	print(":(")
else:
    print("Yay!")

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
l = [
    b - a, c - a, d - a, e - a, c - b, d - b, e - b, d - c, e - c, e - d
]


for i in l:
    if l[i] > k:
        print(":(")
        break
else:
    print("Yay!")

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
l = [
    b - a, c - a, d - a, e - a, c - b, d - b, e - b, d - c, e - c, e - d
]


for i in l:
    print(i)
    if l[i] > k:
        print(":(")
        break
else:
    print("Yay!")

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
l = [
    b - a, c - a, d - a, e - a, c - b, d - b, e - b, d - c, e - c, e - d
]


for i in l:
    if l[i] > 15:
        print(":(")
        break
else:
    print("Yay!")

Submission status: Runtime Error

Solution code:
a,b,c,d,e,k=[input() for _ in range(6)]
if a-e<=k:
    print(':(')
else:
    print('Yay!')

Submission status: Runtime Error

Solution code:
a = [int(input()) for _ in range(5)]
k = int(input())
m = 0
for ai in a:
  for aj in a:    
    if m < abs(ai - aj):
      m = abs(ai - aj)
if m <= k:
  print('Yay!'')
else:
  print(':(')

Submission status: Runtime Error

Solution code:
a = [int(input()) for i in range(5)]
b = int(input())
c = sorted(a)

if c[5]-c[0]<=b:
  print("Yay!")
else:
  print(":(")

Submission status: Runtime Error

Solution code:
a = map(int, input())
b = map(int, input())
c = map(int, input())
d = map(int, input())
e = map(int, input())
k = map(int, input())
if e - a =< k:
  print("Yay!")
else:
  print(":(")

Submission status: Runtime Error

Solution code:
allist = []
for i in range(6):
    num = int(input())
    if i == 5:
        k = num
    else:
        alllist.append(num)

diflist = []
for i in range(4):
    diflist.append(alllist[i+1]-alllist[i])

for i in diflist:
    if i > k:
        print(":(")
        break
else:
    print("Yay!")

Submission status: Runtime Error

Solution code:
antenas = list(int(input()) for i in range(5))

k = int(input)

if (antenas[4] - antenas[0]) <= k:
  print("Yay!")
else :
  print(":(")

Submission status: Runtime Error

Solution code:
antenas = list(int, input() for i in range(5))

k = int(input)

if (antenas[4] - antenas[0]) <= k:
  print("Yay!")
else :
  print(":(")

Submission status: Runtime Error

Solution code:
antenas = list(int, input() for in range(5))

k = int(input)

if (antenas[4] - antenas[0]) <= k:
  print("Yay!")
else :
  print(":(")

Submission status: Runtime Error

Solution code:
def main():
    input_data = [int(input()) for i in range(5)]
    k = int(input())

    input_data.sort()
    input_data..reverse()

    temp = input_data[0] - input_data[4]
    if temp > k :
        print(":(")
    else:
        print('Yay!')

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
def main():
    input_data = [int(input()) for i in range(5)]
    k = int(input())
    count = 0

    input_data = input_data.sort()

    temp = input_data[0] - input_data[4]
    if temp > k :
        print(":(")
    else:
        print('Yay!')

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
def main():
    input_data = [input() for i in range(5)]
    k = int(input())

    input_data.sort()

    for i in input_data:
        temp = i - input_data[4]
        if temp > k :
            print(":(")
            break
        print('Yay!')

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
a,b,c,d,e,k = map(int,input().split())

if e-a<=k:
    print("Yay!")
else :
    print(":(")

Submission status: Runtime Error

Solution code:
x = [int(input()) for _ in range(6)]
print(':(' if x[-2]-[0] > x[-1] else 'Yay!')

Submission status: Runtime Error

Solution code:
def solve(string):
    a, *_, e, k = map(int, string.split())
    return "Yay!" if e - a <= k else ":("


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

Submission status: Runtime Error

Solution code:
import heapq

X, Y, Z, K = map(int, input().split())
A = sorted([int(i) for i in input().split()], reverse=True)
B = sorted([int(i) for i in input().split()], reverse=True)
C = sorted([int(i) for i in input().split()], reverse=True)

heap = []
heapq.heappush(heap, (-(A[0] + B[0] + C[0]), 0, 0, 0))
added = set([(0, 0, 0)])
for _ in range(K):
    p, i, j, k = heapq.heappop(heap)
    if (i + 1, j, k) not in added and i + 1 < X:
        heapq.heappush(heap, (-(A[i + 1] + B[j] + C[k]), i + 1, j, k))
        added.add((i + 1, j, k))
    if (i, j + 1, k) not in added and j + 1 < Y:
        heapq.heappush(heap, (-(A[i] + B[j + 1] + C[k]), i, j + 1, k))
        added.add((i, j + 1, k))
    if (i, j, k + 1) not in added and k + 1 < Z:
        heapq.heappush(heap, (-(A[i] + B[j] + C[k + 1]), i, j, k + 1))
        added.add((i, j, k + 1))
    print(-p)

Submission status: Runtime Error

Solution code:
lis

Submission status: Runtime Error

Solution code:
lis = [a,b,c,d,e,k] 
for i in lis:
  i = input()
if e-a<=k:
  print('Yay!')
else:
  print(':(')

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())

s=[a,b,c,d,e,k]

if s[5]-s[0] <= s[6]:
  print("Yay!")
else:
  print(":(")

Submission status: Runtime Error

Solution code:
s = [input() for i in range(6)]
if s[5]-s[0] < s[6]:
  print("Yay!")
else:
  print(":(")

Submission status: Runtime Error

Solution code:
a,b,c,d,e,k = map(int, input().split())

if (e-a>k):
  print(":(")
else:
  print("Yay!")

Submission status: Runtime Error

Solution code:
a,b,c,d,e,k = map(int, input().split())

if e-a>k:
  print(':(')
else:
  print('Yay!')

Submission status: Runtime Error

Solution code:
x, y, z, k = map(int, input().split())

a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))[:k]

e = []

for va in a:
    for vb in b:
        e.append(va+vb)

e.sort(reverse=True)

e = e[:k]

d = []
for vc in c:
    for ve in e:
        d.append(vc+ve)

d.sort(reverse=True)
d = d[:k]

for vd in d:
    print(vd)

Submission status: Runtime Error

Solution code:
a = int(input())
b = input()
c = input()
d = input()
e = input()
k = int(input())
if e - a <= k:
    print("Yey!")
else:
    print(":(")

Submission status: Runtime Error

Solution code:
a = int(input())
b = input()
c = input()
d = input()
e = input()
k = input()
if e - a <= k:
    print("Yey!")
else:
    print(":(")

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
f = int(input())
k = int(input())

if e-a > k:
    print(":(")
else:
    print("Yay!")

# for i in range(4):
#     for j in range(4):
#         if i<j :
#             print("." * j)
#             continue
#         print(f"i={i}, j={j}")
#
# print()

# numlist = [3, 4.2, 10, "x", 1, 9]
#
# sum = 0
# for num in numlist :
#     if not isinstance(num, (int,float)):
#         print(num, "数値ではありません。")
#         continue
#     sum += num
#     print(num, "/", sum)

# print(1,2, sep ="/")

Submission status: Runtime Error

Solution code:
a,b,c,d,e,k = map(int, input().split)

legth = max(b-a,c-b,d-c,e-d)

if legth > k:
    print(":(")
else:
    print("Yay!")

Submission status: Runtime Error

Solution code:
li = list(map(int,input().split()))
a = li[0]
e = li[4]
k = li[5]

if e - a <= k:
    print("Yay!")
else:
    print(":(")

Submission status: Runtime Error

Solution code:
li = list(map(int,input().split()))
a = li[0]
e = li[4]
k = li[5]

if e - a < k:
    print("Yay!")
else:
    print(":(")

Submission status: Runtime Error

Solution code:
li = list(map(int,input().split()))
li[0] = a
li[4] = e
li[5] = k

if e - a < k:
    print("Yay!")
else:
    print(":(")

Submission status: Runtime Error

Solution code:
li = list(map(int,input().split()))
li[0] = a
li[4] = e
li[5] = k

if e - a <= k:
    print("Yay!")
else:
    print(":(")

Submission status: Runtime Error

Solution code:
li = list(map(int,input().split()))
li[0] = a
li[4] = e
li[5] = k

if e - a <= 15:
    print("Yay!")
else:
    print(":(")

Submission status: Runtime Error

Solution code:
#coding:utf-8

import sys

L = list(int(input()) for i in range(6))

for i in range(5):
        for j in range(5):
            if abs(L[i]-L[j]) > L[6]:
                print(":(")
                sys.exit()

print("Yay!")

Submission status: Runtime Error

Solution code:
num = []
n = int(input())
for i in range(5):
    num.append(int(input()))
a = min(num)
t = n // a
t += 4
if (n % a != 0):
    t += 5
else:
    
print(t)

Submission status: Runtime Error

Solution code:
a = [0 for _ in range*6]

for i in range(6):
    a[i]= int(input())
k = int(input())

dist = a[5]-a[0]

if dist > k:
    print(":(")
else:
    print("Yay!")

Submission status: Runtime Error

Solution code:
s = []
for i in range(6):
  s.append(int(input()))
if(s[4]-s[0]) < k:
  print("Yay!")
else:
  print(":(")

Submission status: Runtime Error

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

if x[4]-x[0] > x[5]:
    print(':(')
else:
    print('Yay!')

Submission status: Runtime Error

Solution code:
n = int(input())
a = list()
f = 0
for i in range(n):
  a[i] = int(input())
k = int(input())
for i in range(n):
  for j in range(n):
    if i == j:
      continue
    if abs(a[i] - a[j]) > k:
      f = 1
if f == 0:
  print("Yay!")
else:
  print(":(")

Submission status: Runtime Error

Solution code:
a, b, c, d, e, k = [int(i) for i in input().split()]
if e-a > k:
    print(':(')
else:
    print('Yay')

Submission status: Runtime Error

Solution code:
L = []
for i in range(5):
  x = input()
  L.append(x)
K = int(input())
if L[4] - L[0] <= K:
  print('Yay!')
else:
  print(':(')

Submission status: Runtime Error

Solution code:
a = int(intpu())
b= int(intpu())
c = int(intpu())
d = int(intpu())
e = int(intpu())
k = int(intpu())

if e - a > k:
    print(':(')
else:
    print('Yay!')

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
frag = 0
max=a
min=a
if (max<b):
    max=b
if (max<c):
    max=c
if (max<d):
    max=d
if (max<e):
    max=e
if (min>b):
    min=b
if (min>c):
    min=c
if (min>d):
    min=d
if (min>e):
    min=e
z= max-min
if (z>k):
    print(':(')
    else :
        print('Yay!')

Submission status: Runtime Error

Solution code:
a, b, c, d, e, k = map(int, input().split())
if (e - a) >= k:
  print(":(")
else:
  print("Yay!")

Submission status: Runtime Error

Solution code:
a, b, c, d, e, k = map(int, input().split())
if e - a >= k:
  print(":(")
else:
  print("Yay!")

Submission status: Runtime Error

Solution code:
A = []
for i in range(5):
  str = input()
  A[i] = int(str)
K = int( input() )

if( A[5] - A[0] > K):
  print("Yay!")
else:
  print(":(")

Submission status: Runtime Error

Solution code:
str = input().split()
flag = 0
k = str[len(str)]
for i in range( 1,len(str) ):
  if str[i] - str[i-1] > k:
    flag = 1
if flag == 1:
  print(":(")
else:
  print("Yay!")

Submission status: Runtime Error

Solution code:
n = input().rsplit()
points = [int(i) for i in n]
dist = points[-2] - points[0]
if dist > points[-1]:
    print(':(')
else:
    print('Yay!')

Submission status: Runtime Error

Solution code:
n = input().rsplit()
points = [int(i) for i in n]
distances = []
for i in range(len(points)-2):
   dist = points[-2] - points[i]
   distances.append(dist)

if max(distances) > points[-1]:
    print(':(')
else:
    print('Yay!')

Submission status: Runtime Error

Solution code:
a,*_,e,k=map(int,input(input().split()));print([':(','Yey!'][e-a<=k])

Submission status: Runtime Error

Solution code:
a = int(input().split())
b = int(input().split())
c = int(input().split())
d = int(input().split())
e = int(input().split())
k = int(input().split())
if (e-a)>k:
    print(":(")
else:
    print("Yay!")

Submission status: Runtime Error

Solution code:
a=input()
b=input()
c=input()
d=input()
e=input()
k=input()
if e-a<=k:
  print('Yay!')
else:
  print(':(')

Submission status: Runtime Error

Solution code:
a=input()
b=input()
c=input()
d=input()
e=input()
k=input()
if e-a<=k:
  print('Yay!')
  else
  print(':(')

Submission status: Runtime Error

Solution code:
a=input()
b=input()
c=input()
d=input()
e=input()
k=input()
if e-a<k:
  print('Yay!')
  else
  print(':(')

Submission status: Runtime Error

Solution code:
a=input()
b=input()
c=input()
d=input()
e=input()
k=input()
if e-a>k:
  print('Yay!')
  else
  print(':(')

Submission status: Runtime Error

Solution code:
X,Y,Z,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
A.sort(reverse= True)
B.sort(reverse= True)
C.sort(reverse= True)
LIS = []
LISA = []
LISB = []
S = 0
T = 0
for s in range(X):
    for t in range(Y):
        if (s+1)*(t+1) <= 3000:
            LISA.append(s)
            LISB.append(t)
        elif (s+1)*(t+1) > 3000:
            S += s
            T += t
            break
            
for i in range(len(LISA)):
    PR = A[LISA[i]]+B[LISB[i]]
    for j in range(max(Z,(3000//(S+1)),(3000//(T+1)))):
        LIS.append(PR+C[j])
LIS.sort(reverse = True)
for i in range(min(len(LIS),K)):
    print(LIS[i])

Submission status: Runtime Error

Solution code:
X,Y,Z,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
A.sort(reverse= True)
B.sort(reverse= True)
C.sort(reverse= True)
LIS = []
LISA = []
LISB = []
S = 0
T = 0
for s in range(X):
    for t in range(Y):
        if (s+1)*(t+1) <= 3000:
            LISA.append(s)
            LISB.append(t)
        elif (s+1)*(t+1) > 3000:
            S += s
            T += t
            break
            
for i in range(len(LISA)):
    PR = A[LISA[i]]+B[LISB[i]]
    for j in range(max(X,(3000//(S+1)),(3000//(T+1)))):
        LIS.append(PR+C[j])
LIS.sort(reverse = True)
for i in range(min(len(LIS),K)):
    print(LIS[i])

Submission status: Runtime Error

Solution code:
arr = []
5.times do |i|
  arr << gets.to_i
end
k = gets.to_i
sa = arr[-1] - arr[0]

puts sa < k ? "Yay!" : ":("

Submission status: Runtime Error

Solution code:
    a = int(input())
    b = int(input())
    c = int(input())
    d = int(input())
    e = int(input())
    k = int(input())
     
    if e - a <= k:
        print('Yay!')
    else:
        print(':(')

Submission status: Runtime Error

Solution code:
n = []
for i in range(5):
    n.append(int(input()))

k = input()

if n[4] - n[0] <= k:
    print('Yay!')
else:
    print(':(')

Submission status: Runtime Error

Solution code:

n = []
for i in range(5):
    n.append(input())

k = input()

if n[4] - n[0] <= k:
    print('Yay!')
else:
    print(':(')

Submission status: Runtime Error

Solution code:
a,b,c,d,e,k = map(int, input().split())
if(e-a <= k):
    print("Yay!")
else:
    print(":(")

Submission status: Runtime Error

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

if e - a <= k:
  print('Yay!')
else:
  print(':(')

Submission status: Runtime Error

Solution code:
x = list(5)
for i in range(5) : x[i] = int(input())
x.sort()
k = int(input())
if x[4] - x[0] <= k : print("Yay!")
else : print(":(")

Submission status: Runtime Error

Solution code:
X,Y,Z,K = map(int,input().split())
list_a = list(map(int,input().split()))
list_b = list(map(int,input().split()))
list_c = list(map(int,input().split()))

list_a.sort(reverse=True)
list_b.sort(reverse=True)
list_c.sort(reverse=True)

list = []

for la in list_a:
    for lb in list_b:
        list.append([la,lb,la+lb])

list.sort(key=lambda x:x[2],reverse=True)

list2 = []

for a,b,n in list:
    for lc in list_c:
        list2.append(n+lc)

list2.sort(reverse=True)

cnt = 0

for i in list2:
    print(i)
    cnt += 1
    if cnt == K:
        exit()

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if(e - a >= k):
  print(":(")
  else:
    print("Yai!")

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
List=[a,b,c,d,e]
for i j in range(5):
  if List[i]-List[j]>k:
    print("Yay!")
    break
  else:
    print(":(")

Submission status: Runtime Error

Solution code:
l = [int(input()) for i in range(5)]
if l <= int(input()):
    print('Yay!')
else:
    print(':(')

Submission status: Runtime Error

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

a = n[0]
e = n[4]
k = n[5]

if e - a > k:
    print(':(')
else:
    print('Yay!')

Submission status: Runtime Error

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

a = n[0]
e = n[4]
k = n[5]

if e - a > k :
    print(':(')
else:
    print('Yay!')

Submission status: Runtime Error

Solution code:
v=[int(input()) for_ in range(6)]
print('Yay!' if v[4]-v[0]<=v[5] else ':(')

Submission status: Runtime Error

Solution code:
v=[int(input()) for_ in range(6)]
print('Yay!' if all([v[i+1]-v[i]<=v[5] for i in range(4)]) else ':(')

Submission status: Runtime Error

Solution code:
v=[int(input()) for_ in range(6)]
print('Yay!' if all([abs(v[i]-v[i+1])<=v[5] for i in range(4)) else ':(')

Submission status: Runtime Error

Solution code:
import sys
import subprocess
import re
import datetime
import os

A = []
A[0] = int(input())
A[1] = int(input())
A[2] = int(input())
A[3] = int(input())
A[4] = int(input())
k = int(input())

S = A.sorted()

V = (S[4] - S[0])
if V <= k:
    print("Yay!")
else:
    print(":(")

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
dishes = [a,b,c,d,e]
n = []
ans = 0
for i in range(5):
  if dishes[i]%10==0:
    ans += dishes[i]//10
  else:
    ans += dishes[i]//10+1
    n.append(dishes[i]%10)
if len(n)==0:
  print(ans*10)
else:
ans = ans*10-10+min(n)
print(ans)

Submission status: Runtime Error

Solution code:
# abc123_a.py
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())

l=[]
# l=[a,b,c,d,e]
l.append(a)
l.append(b)
l.append(c)
l.append(d)
l.append(e)

size=len(l)
for i in range(size):
 for j in range(i,size):
  if i == j:
   continue
  if (l[j]-l[i]) > k:
   print(":(")
   exit(-1)

print("Yay!")

Submission status: Runtime Error

Solution code:
# abc123_a.py
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())

l=[a,b,c,d,e]
size=len(l)
for i in range(size):
 for j in range(i,size):
  if i == j:
   continue
  if (l[j]-l[i]) > k:
   print(":(")
   exit(-1)

print("Yay!")

Submission status: Runtime Error

Solution code:
# abc123_a.py
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())

l=[a,b,c,d,e]
size=len(l)
for i in range(size-1):
 if (l[i+1]-l[i]) > k:
  print(":(")
  exit(-1)

print("Yay!")

Submission status: Runtime Error

Solution code:
# abc123_a.py
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())

l=[a,b,c,d,e]
size=len(l)
for i in range(size):
 for j in range(i,size):
  if i == j:
   continue
  if (l[j]-l[i]) > k:
   print(":(")
   exit(-1)

print("Yay!")

Submission status: Runtime Error

Solution code:
K = int(input().split()[3])
A = sorted(list(map(int, input().split())), reverse=True)
B = sorted(list(map(int, input().split())), reverse=True)
C = sorted(list(map(int, input().split())), reverse=True)

ans = []
for i in range(len(A)):
    for j in range(len(B)):
        if (i+1) * (j+1) > K:
            break
        for k in range(len(C)):
            if (i+1)*(j+1)*(k+1) > K:
                break
            ans.append(A[i]+B[j]+C[k])
ans.sort(reverse=True)
for _ in range(K):
    print(ans[_])

Submission status: Runtime Error

Solution code:
a = input()
b = input()
c = input()
d = input()
e = input()
k = input()
dis = e - a
if dis <= k:
    print('Yay!')
else:
    print(':(')

Submission status: Runtime Error

Solution code:
a=list(map(int,input().split()))
print(((a[4]-a[0])>a[5]?Yay!::()))

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())

if any(e-a>k):
  print(":(")
else:
  print('Yay!')

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
n=[a,b,c,d,e,f]
for i,j in n:
  l=int(abs(i-j))
if any(l>k):
  print(":(")
else:
  print('Yay!')

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
#a,b,c,d,e,k = 2,4,7,8,15,1
#box = [a,b,c,d,e]
box = []
for i in range(0,5):
    box.append(int(input())
k = int(input())
c = 0
for i in range(0,4):
    if box[i+1] - box[i] > k :
        c +=1
    else:
        pass
if c == 0:
    print("Yay!")
else:
    print(":(")

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
#a,b,c,d,e,k = 2,4,7,8,15,1
#box = [a,b,c,d,e]
box = []
for i in range(0,5):
    box.append(int(input())
c = 0
for i in range(0,4):
    if box[i+1] - box[i] > k :
        c +=1
    else:
        pass
if c == 0:
    print("Yay!")
else:
    print(":(")

Submission status: Runtime Error

Solution code:
a, b, c, d, e = [int(input) for i in range(5)]
k = int(input())
if e-a > k*4:
  print(":(")
elif e-b > k*3 or d-a > k*3:
  print(":(")
elif e-c > k*2 or d-b > k*2 or c-a > k*2:
  print(":(")
elif e-d > k or d-c > k or c-b > k or b-a > k:
  print(":(")
else:
  print("Yay!")

Submission status: Runtime Error

Solution code:
if __name__ == "__main__":
    input_values = []
    for i in range(5):
        input_values.append(input())
    k = input()

    if input_values[-1] - input_values[0] <= k:
        print("Yay!")
    else:
        print(":(")

Submission status: Runtime Error

Solution code:
input_values = []
for i in range(5):
    input_values.append(input())
k = input()

if input_values[-1] - input_values[0] > k:
    print("Yay!")
else:
    print(":(")

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
f=int(input())

if e - a <=  f:
  print('Yay!')
else
  print(':(')

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
f=int(input())

if e - a =<  f:
  print('Yay!')
else
  print(':(')

Submission status: Runtime Error

Solution code:
a=[]
for i in range(4):
    b=int(input())
    a.append(b)
c=int(input())
if a[0] - a[4] <= c:
    print('Yay!')
else:
    print(':(')

Submission status: Runtime Error

Solution code:
a=[]
for i in range(4):
    b=int(input())
    a.append(b)
c=int(input())
if max(a) - min(a) =< c:
    print('Yay!')
else:
    print(':(')

Submission status: Runtime Error

Solution code:
from math import ceil
time_list = [int(input()) for i in range(5)]
sum_list = []
time_list_0 = []
for i in range(5):
    time_list_0[i] = ceil(time_list[i] / 10) * 10
for j in range(5):
    if time_list[j] == 0:
        sum_list[j] = sum(time_list_0)
    else:
        sum_list[j] = sum(time_list_0) - 10 + time_list[j] % 10
print(min(sum_list))

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python
a = input()
b = input()
c = input()
d = input()
e = input()
k = input()

if int(e) - int(a) > k:
    print(":(")
else:
    print("Yay!")

Submission status: Runtime Error

Solution code:
a,b,c,d,e,k = map(int, input().split())
print(':(' if e-a > k else "Yay!")

Submission status: Runtime Error

Solution code:
a=[]
for _ in range (6):
	a.append(int(input()))
k=a[5]
a.remove(5)
if max(a)-min(a)>k:
	print(":(")
else:
	print("Yay!")

Submission status: Runtime Error

Solution code:
a = input(>>)
b = input(>>)
c = input(>>)
d = input(>>)
e = input(>>)

k = input(>>)

if (a+b+c+d+e) > 4k:
    print(":(")
else:
    print(Yay!)

Submission status: Runtime Error

Solution code:
a=list(map(int, input().split()))
k=a[5]
a.remove(5)
if max(a)-min(a)>k:
	print(":(")
else:
	print("Yay!")

Submission status: Runtime Error

Solution code:
x=[int(input()) for i in range(5)]
print("Yay!" if max(x)-min(x)>=k else ":(")

Submission status: Runtime Error

Solution code:
x=[input() for i in range(5)]
print("Yay!" if max(x)-min(x)>=k else ":(")

Submission status: Runtime Error

Solution code:
c = list()
for i in range(6):
  c.append(int(input()))
if coo[4] - coo[0] > coo[5]:
  print(":(")
else:
  print("Yay!")

Submission status: Runtime Error

Solution code:
C = list()
for i in range(6):
    coo.append(int(input()))
  if coo[4] - coo[0] > coo[5]:
    print(":(")
  else:
    print("Yay!")