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: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
ans = [int(input()) for _ in range(6)]
print(':(' if abs(ans[0]-ans[4]) <= ans[-1] else 'Yay!')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
li = []

for i in range(5):
    li.append(int(input()))

k = int(input())

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

Submission status: Wrong Answer

Solution code:

# a, b, c, d, e, k = map(int, input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())


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

Submission status: Wrong Answer

Solution code:
li=[]
for i in range(5):
  li.append(int(input()))
k=int(input())
ans="Yay!"
for i in range(5):
  for j in range(4-i):
    if li[j]-li[i]>k:
      ans=":("
print(ans)

Submission status: Wrong Answer

Solution code:
a,b,c,d,e,f = [ int(input()) for i in range(6) ]

if b-a<=f and c-b<=f and d-c<=f and e-d<=f:
  print("Yay!")
 
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
A=[int(input()) for i in range(5)]
k=int(input())
for i in range(5):
    for j in range(i,5):
        if abs(A[i]-A[j])>=k:
            print(":(")
            exit()
print("Yay!")

Submission status: Wrong Answer

Solution code:
A=[int(input()) for i in range(5)]
k=int(input())
for i in range(5):
    for j in range(i,5):
        if abs(A[i]-A[j])>=k:
            print(":(")
            exit()
print("Yay1")

Submission status: Wrong Answer

Solution code:
n=int(input())
mb=[int(input()) for i in range(5)]
print(-(-n//min(mb))+4)

Submission status: Wrong Answer

Solution code:
stdin = []
for x in range(6):
    stdin.append(int(input()))
print(stdin)
a,b,c,d,e,k = (x for x in stdin)
ans = "Yay!"

for x in range(len(stdin)- 1):
    if x != len(stdin) - 2:
        for y in range(x+1,len(stdin)-1):
            if abs(stdin[x]-stdin[y]) > k:
                ans = ":("
print(ans)

Submission status: Wrong Answer

Solution code:
a = int(input())
e = int(input())
k = int(input())
if e-a <= k:
	print("Yay!")
else:
	print(":(")

Submission status: Wrong Answer

Solution code:
a = int(input())
e = int(input())
k = int(input())
if e-a <= k:
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
a = int(input())
e = int(input())
k = int(input())
if e-a > k:
  print(":(")
else:
  print("Yay!")

Submission status: Wrong Answer

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

if max(a, b, c, d, e) - min(a, b, c, d, e) > 15:
  print(':(')
else:
  print('Yay!')

Submission status: Wrong Answer

Solution code:
import math

price = [int(input()) for i in range(5)]
price.sort(key = lambda i:-i%10)
ans = 0
for i in range(4):
  ans += math.ceil(price[i]/10)*10
  
ans += price[4]

print(ans)

Submission status: Wrong Answer

Solution code:
A = [int(input()) for _ in range(5)]
k = int(input())
cnt = 0
for i in range(4):
    if A[i+1] - A[i] >= k:
        cnt += 1
if cnt:
    print(':(')
else:
    print('Yay!')

Submission status: Wrong Answer

Solution code:
A = [int(input()) for _ in range(5)]
k = int(input())
cnt = 0
for i in range(4):
    if A[i+1] - A[i] > k:
        cnt += 1
if cnt:
    print(':(')
else:
    print('Yay!')

Submission status: Wrong Answer

Solution code:
a = [int(input())  for i in range(6)]
ans = "Yay!"
for i in range(5):
    if a[i] > a[5]:
        ans = ":("
        break
print(ans)

Submission status: Wrong Answer

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

x_max = max(x)
x_min = min(x)

if x_max-x_min < k:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
import sys
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
antena = [a,b,c,d,e]
for i in range(len(antena)):
    for j in range(i+1,len(antena)):
        if antena[j]-antena[i]<k:
            state = 1
        else:
            state = 0
            break
    if state == 0:
        print(":(")
        sys.exit()
print("Yay!")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys

inputs = [int(row.split()[0]) for row in sys.stdin.readlines()]

max_distance = inputs[-1]
antenna_list = inputs[:-1]

antenna_list = sorted(antenna_list)    

if (antenna_list[-1] - antenna_list[0]) < max_distance:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

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

A = [a,b,c,d,e]
wa = 0

for i in range(4):
    if A[-1-i]-A[-2-i]>k:
        wa += 1
        
print(":("*(wa>=0) or "Yay!")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
an=[int(x) for x in input().split()]
k=an[-1]
max=max(an)
min=min(an)
if max -min < k:
    print("Yay!")
else:
    print(":()")

Submission status: Wrong Answer

Solution code:
lis = [int(input()) for _ in range(6)]
if max(lis)-min(lis) <= 15:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
antenna = [int(input()) for i in range(5)]
k = int(input())
ans = 'Yey!'
for i in range(5):
    for j in range(i):
        if abs(antenna[i]-antenna[j])>k:
            ans = ':('
print(ans)

Submission status: Wrong Answer

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:
    ('Yay!')

Submission status: Wrong Answer

Solution code:

dishes = [input() for _ in range(5)]

sum_dishes = 0
last_dish = 0
last_tmp = 0
for idx, dish in enumerate(dishes):
    tmp = 10 - int(dish[-1])
    dish = int(dish)
    if tmp == 10:
        sum_dishes += dish
    elif tmp > last_tmp:
        sum_dishes += last_dish + last_tmp
        last_dish = dish
        last_tmp = tmp
        last_idx = idx
    else:
        sum_dishes += dish + tmp

print(sum_dishes + int(dishes[last_idx]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

flag = True
for i in range(4):
  for j in range(i, 5):
    if a[i] - a[j] > a[len(a)-1]:
      flag = False
      break

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

Submission status: Wrong Answer

Solution code:
import math
n,*l=map(int,open(0).read().split())
print(4+math.ceil(n/min(l)))

Submission status: Wrong Answer

Solution code:
A = list(map(int,open(0).read().split()))
k = A.pop()

ans = 'Yay!'

for i in range(len(A)-1):
    for j in range(i+1, len(A)):
        d = abs(A[i] - A[j])
        print(d)
        if d > k:
            ans = ':('

print(ans)

Submission status: Wrong Answer

Solution code:
antennas=[]
for _ in range(5):
    antennas.append(int(input()))
k=int(input())
    
for i in range(5):
    for j in range(i+1,5):
        if antennas[j]-antennas[i]>k:
            print(":()")
            exit()

print("Yay!")

Submission status: Wrong Answer

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]

can = False
for i in range(len(list)):
  for j in range(len(list)):
    if i == j:
      continue
    if abs(list[i] - list[j]) > k:
      break
      
if can:
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

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]

can = False
for i in range(len(list)):
  for j in range(len(list)):
    if i == j:
      continue
    if abs(list[i] - list[j]) <= k:
      can = True
    else:
      can = False
      
if can:
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

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]

can = False
for i in range(len(list)):
  for j in range(len(list)):
    if i == j:
      continue
    if abs(list[i] - list[j]) <= k:
      can = True
      
if can:
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

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]

can = False
for i in range(len(list)):
  for j in range(len(list)):
    if i == j:
      continue
    if list[i] * list[j] <= k:
      can = True
      
if can:
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

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: Wrong Answer

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: Wrong Answer

Solution code:
import sys

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())

sys.setrecursionlimit(10 ** 9)


def main():
    L = [INT() for _ in range(5)]
    k = INT()

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
m=[]
cnt=0
for i in range(5):
    x=int(input())
    m.append(x)
m10=[i % 10 for i in m if i %10 >=1]
t=min(m10)
for i in m:
    if i %10==0:
        cnt += i
    else:
        cnt += ((i//10)+1)*10
print(cnt-10+t)

Submission status: Wrong Answer

Solution code:

lst = list(int(input()) for _ in range(6))

print("Yay!" if lst[4] - lst[1] <= lst[5] else ":(")

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#123 a
z=[]
ans=0
for i in range(5):
    z.append(int(input()))
k=int(input())
for i in range(4):
    if k>=(z[i+1]-z[i]):
        ans+=1
print("Yay!" if ans else ":(")

Submission status: Wrong Answer

Solution code:
#123 a
z=[]
ans=0
for i in range(5):
    z.append(int(input()))
k=int(input())
for i in range(4):
    if k>(z[i+1]-z[i]):
        ans+=1
print("Yay!" if ans else ":(")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A= [int(input()) for i in range(6)]
answer = "Yay!"
for u in range(4):
  for s in range(u,4):
    if A[s] - A[u] > A[5]:
      answer = ":("
print(answer)

Submission status: Wrong Answer

Solution code:
A= [int(input()) for i in range(6)]
answer = "Yay!"
for u in range(4):
  for s in range(u+1,4):
    if A[s] - A[u] > A[5]:
      answer = ":("
print(answer)

Submission status: Wrong Answer

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

k = int(input())


if max(A)-min(A) > k:
  print(':(')
else:
  print('Yay')

Submission status: Wrong Answer

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

k = int(input())

for i in range(4, 0, -1):
  A[i] -= A[i-1]

if max(A) > k:
  print(':(')
else:
  print('Yay')

Submission status: Wrong Answer

Solution code:
N = []

for i in range(6):
    N.append(int(input()))

ans = "Yay!"
for i in range(5):
    for j in range(i+1,5):
        dist = abs(N[j] - N[i])
        print(dist)
        if dist > N[5]:
            ans = ":("

print(ans)

Submission status: Wrong Answer

Solution code:
N = []

for i in range(6):
    N.append(int(input()))

ans = "Yay!"
for i in range(4):
    for j in range(i,4):
        dist = N[j] - N[i]
        if dist > N[5]:
            ans = ":("

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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: Wrong Answer

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!")
elif (b-a)>= k or (c-b)>= k or (d-c)>= k or (e-d)>= k:
    print(":(")
else:
    print("Yay!")

Submission status: Wrong Answer

Solution code:
x=[int(input()) for _ in range(6)]
print('Yay!' if bool((x[k]-x[i]<=x[5]) for i in range(5) for k in range(i+1, 5)) else ':(')

Submission status: Wrong Answer

Solution code:
x=[int(input()) for _ in range(6)]
f=True
for i in range(5):
    for k in range(i+1, 5):
        if x[k]-x[i]<x[5]:
            f=False
            break
print('Yay!' if f else ':(')

Submission status: Wrong Answer

Solution code:
max_dis = 0
a = int(input())
for _ in range(3):
    input()
b = int(input())
k = int(input())
if b - a < k:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
l = [int(input()) for _ in range(5)]
k = int(input())
 
flag = False
for i in range(5):
  for j in range(i +1, 5):
    if l[j] - l[i] > k:
      flag = True
      break

if flag:
  print(":(")
else:
  print("Yay")

Submission status: Wrong Answer

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

flag = False
for i in range(4):
  if l[i+1] - l[i] > k:
    flag = True

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

Submission status: Wrong Answer

Solution code:
a = input()
b = input()
c = input()
d = input()
e = input()
k = input()
if k>e -a:
    print "yay"
else:
    print":("

Submission status: Wrong Answer

Solution code:
# coding: utf-8 
#Author:Code

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

Submission status: Wrong Answer

Solution code:
l1 = []
for _ in range(6):
  l1.append(int(input()))

if (l1[4] - l1[0]) < l1[5]:
  r = ':('
else:
  r = 'Yay!'
  
  
print(r)

Submission status: Wrong Answer

Solution code:
l = [int(input()) for _ in [0] * 6]
#print(l)
k=l.pop()
#print(l)
#print(k)
for i in range(5):
    for j in range(5):
        if abs(l[j] - l[i]) > k:
            print(':(')
            break
    break
else:
    print('Yay!')

Submission status: Wrong Answer

Solution code:
a, b, c, d, e, k = [int(input()) for i in range(6)]
print("Yey!" if (e-a)<=k else ":(")

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
import itertools

aList = []

for i in range(5):
  aList.append(int(input()))

k = int(input())

aiList = list(itertools.combinations(aList,2))

for j in aiList:
  if j[1] - j[0] >k:  
    print(":(")
    exit(0)

print("Yay")

Submission status: Wrong Answer

Solution code:
import itertools

aList = []

for i in range(5):
  aList.append(int(input()))

k = int(input())

aiList = list(itertools.combinations(aList,2))

for j in aiList:
  if j[1] - j[0] >k:  
    print(":(")
    exit(0)

print("Yap")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ok = True
for i in range(4):
    left = antennas[i]
    for a in antennas[i+1:]:
        if left - a > k:
            ok = False
            break
    if not ok:
        break

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

Submission status: Wrong Answer

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

ok = True
for i in range(4):
    left = antennas[i]
    for a in antennas[i+1:]:
        if left > k:
            ok = False
            break
    if not ok:
        break

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

Submission status: Wrong Answer

Solution code:
s = [int(input()) for i in range(6)]
for i in range(len(s)-2):
  for j in range(i+1,len(s)-1):
    if abs(s[i] - s[j]) >= s[-1]:
      print(':(')
      exit()
print('Yay!')

Submission status: Wrong Answer

Solution code:
s = [int(input()) for i in range(6)]
for i in range(len(s)-2):
  for j in range(i+1,len(s)-1):
    print(str(s[i])+' '+str(s[j]))
    if abs(s[i] - s[j]) >= s[-1]:
      print(':(')
      exit()
print('Yay!')

Submission status: Wrong Answer

Solution code:
s = [int(input()) for i in range(6)]
for i in range(len(s)-2):
  for j in range(1,len(s)-1):
    if abs(s[i] - s[j]) >= s[-1]:
      print(':(')
      exit()
print('Yay!')

Submission status: Wrong Answer

Solution code:
s = [int(input()) for i in range(6)]
for i in range(len(s)-2):
  for j in range(1,len(s)-1):
    if abs(s[i] - s[j]) <= s[-1]:
      print(':(')
      exit()
print('Yay!')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A = sorted([int(input()) for _ in range(5)])
k = int(input())
flag = True
for i in range(4):
    if(A[i+1]-A[i] > k):
        flag = False
        break
print('Yay!' if flag else ':(')

Submission status: Wrong Answer

Solution code:
s=list(int(input()) for _ in range(6))

k=s[6-1]
for i in range(len(s)-1):
    if s[i+1]-s[i] >k:
        ans = ":("
        break
    else:
        ans="Yay!"

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
l=[]
t=1
l.append(int(input()))
l.append(int(input()))
l.append(int(input()))
l.append(int(input()))
l.append(int(input()))
k=int(input())
for i in range(4):
    for j in range(i+1,5):
        if abs(l[i]-l[j])>k:
            t=0
            print(':(')
            break
if t:
    print('Yay!')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
lst=[]
for i in range(5):
  lst.append(int(input()))
k=int(input())
flg=True
for i in range(4):
  if lst[i+1] - lst[i] > k:
    flg = False
print("Yay!" if flg else ":(")

Submission status: Wrong Answer

Solution code:
a = ([int(input())for _ in range(5)])
k = int(input())
ans="Yay!"
for i in range(1,4):
	if k < a[i]-a[0]:
		ans=":("
print(ans)

Submission status: Wrong Answer

Solution code:
N = 5
A = [0] * N
for i in range(N):
  A[i] = int(input())
k = int(input())

ans = 0

for i in range(N):
  for j in range(i+1, N):
    if abs(A[i] - A[j]) > k:
      ans += 1

if ans > 1:
  print(':(')
else:
  print('Yay!')

Submission status: Wrong Answer

Solution code:
N = 5
A = [0] * N
for i in range(N):
  A[i] = int(input())
k = int(input())

ans = 0

for i in range(N):
  for j in range(i, N):
    if abs(A[i] - A[j]) > k:
      ans += 1

if ans > 1:
  print(':(')
else:
  print('Yay!')

Submission status: Wrong Answer

Solution code:
a = input()
_ = input()
_ = input()
_ = input()
e = input()
k = input()

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

Submission status: Wrong Answer

Solution code:
a = input()
_ = input()
_ = input()
_ = input()
e = input()
k = input()

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

Submission status: Wrong Answer

Solution code:
lst=[int(input()) for _ in range(5)]
k=int(input())
cnt=0
for i in range(5):
    for j in range(i+1,5):
        x=lst[j]-lst[i]
        if x>k:
            print(':(')
            break
        else:
            cnt+=1
if cnt==10:
    print('Yay!')

Submission status: Wrong Answer

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

for i in range(4):
  for _ in range(1,5):
    if (x[i] - x[_]) > k:
      print(":(")
      exit()
print("Yay!")

Submission status: Wrong Answer

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

for i in range(4):
  for _ in range(1,5):
    if abs(x[i] - x[_]) > k:
      print(":(")
      exit()
  print("Yay!")

Submission status: Wrong Answer

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

for i in range(4):
  for _ in range(1,5):
    if abs(x[i] - x[_]) > k:
      print(":(")
    exit()
else:
  print("Yay!")

Submission status: Wrong Answer

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

for i in range(4):
  for _ in range(1,5):
    if x[i] - x[_] > k:
      print(":(")
    exit()
else:
  print("Yay!")

Submission status: Wrong Answer

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

for i in range(4):
  for _ in range(1,5):
    if abs(x[i] - x[_]) > k:
      print(":(")
    exit()
else:
  print("Yey!")

Submission status: Wrong Answer

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

for i in range(4):
  for _ in range(1,5):
    if x[i] - x[_] > k:
      print(":(")
    exit()
else:
  print("Yey!")

Submission status: Wrong Answer

Solution code:
a=[int(input()) for i in range(5)]
k=int(input())
for i in range(4):
  for j in range(1,5):
    if abs(a[i]-a[j])>k:
      print(':(')
      exit()
print('Yay')

Submission status: Wrong Answer

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

ans = "Yay!"
for i in range(5):
    for j in range(i+1, 5):
        if antennas[j] - antennas[i] >= k:
            ans = ":("

print(ans)

Submission status: Wrong Answer

Solution code:

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

if a[4] - a[0] < a[5]:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
Max = 0
Min = 0
for _ in range(5):
    tmp = int(input())
    if Max < tmp:
        Max = tmp
    elif Min > tmp:
        Min = tmp
k = int(input())
if Max - Min <= k:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
A = []
B = []
C = []
s = 10
for _ in range(5):
  A.append(int(input()))
for a in A:
  s = a%10
  if s != 0:
    B.append(a-s+10)
    C.append(s)
  else:
    B.append(a)
if len(C) == 0:
  print(sum(A))
else:
  b = sum(B)
  print(b-10 +min(C))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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("Yay!")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

t = max(l)-min(l)

if t < k:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

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

mi = [a%10,b%10,c%10,d%10,e%10]
mm = [i for i in mi if i != 0]
mm.sort()
sum = 0
for i in range(5):
	if p[i]%10 != 0:
		sum += (p[i]//10+1)*10
	else:
		sum += p[i]//10*10
if (mm):
	sum -= 10- mm[0]
else:
	sum = 0
print (sum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
i = [int(input()) for i in range(6)]

if (max(i[1:6])-min(i[1:6])) <= i[5]:
  print('Yay!')
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
#import math.sqrt as sqrt

#S = list(map(int, input().split()))
#B = list(map(int, input().split()))

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if abs(a-b) > k or abs(b-c) > k or abs(c-d) > k or abs(d-e) > k or abs(a-d) > k:
    print(":(")
else:
    print("Yay!")

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
def print_ans(ar, k):
    """Test Case
    >>> print_ans([1, 2, 4, 8, 9], 15)
    Yay!
    >>> print_ans([15,18,26,35,36],18)
    :(
    """
    flg = False
    for i in range(4):
        for j in range(i+1,5):
            if ar[j] -ar[i] >= k:
                flg = True
                break
        if flg:
            break
    if flg:
        print(":(")
    else:
        print("Yay!")


if __name__ == '__main__':
    ar = [ int(input().rstrip()) for _ in range(5)]
    k = int(input().rstrip())
    print_ans(ar, k)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
dis =[]
dis.append(a)
dis.append(b)
dis.append(c)
dis.append(d)
dis.append(e)

if max(dis)-min(dis)>=k:
  print(":(")
else:
  print("Yay!")

Submission status: Wrong Answer

Solution code:
abcde =[ int(input()) for _ in range(5)] 
K = int(input())
flag = False
for i in range(5):
    for s in range(4-i):
        if abcde[s] - abcde[i] > K:
            flag = True
if flag:
    print(':(')
else:
    print('Yay!')

Submission status: Wrong Answer

Solution code:
abcde =[ int(input()) for _ in range(5)] 
K = int(input())
flag = False
for i in range(5):
    for s in range(4-i):
        if abcde[s] - abcde[i] > 15:
            flag = True
if flag:
    print(':(')
else:
    print('Yay!')

Submission status: Wrong Answer

Solution code:
import math
 
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
 
li = [a, b, c, d, e]
 
idx = sorted(list(map(lambda x: [x, (x[1] % 10) + 10] if x[1] == 0 else x, [[0, a], [1, b], [2, c], [3, d], [4, e]])), key=lambda x: x[1])[0][0]
print(sum(map(lambda x: li[x] if x == idx else math.ceil(li[x] * 0.1) * 10, [0, 1, 2, 3, 4])))

Submission status: Wrong Answer

Solution code:
#--import & define---------------------
import math

def yes():
    print("Yes")
def no():
    print("No")
#--memo--------------------------------
#mapを利用した入力
# x,y = map(int,input().split())

#forを利用した入力
#l = []
#for i in range():
#    l.append(int(input()))
#    print(i,l)
#--------------------------------------
l = []
for i in range(6):
   l.append(int(input()))

if l[0]-l[1]>l[5] or l[1]-l[2]>l[5] or l[2]-l[3]>l[5] or l[3]-l[4]>l[5]:
    print(":(")
else:
    print("Yay!")

Submission status: Wrong Answer

Solution code:
#--import & define---------------------
import math

def yes():
    print("Yes")
def no():
    print("No")
#--memo--------------------------------
#mapを利用した入力
# x,y = map(int,input().split())

#forを利用した入力
#l = []
#for i in range():
#    l.append(int(input()))
#    print(i,l)
#--------------------------------------
l = []
for i in range(6):
   l.append(int(input()))

if l[0]-l[1]>l[5] or l[1]-l[2]>l[5] or l[2]-l[3]>l[5] or l[3]-l[4]>l[5]:
    no()
else:
    yes()

Submission status: Wrong Answer

Solution code:
l=list(int(input()) for _ in range(5))
m=int(input())
cnt=0
for i in range(4):
  if l[i+1]-l[i]<=m:
    cnt+=1
print([":(","Yay!"][cnt==4])