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 :( .

Solution (Python):
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
coo=[a,b,c,d,e]
flag=0
for i in range(len(coo)):
  for j in range(i+1,len(coo)):
    if abs(coo[i]-coo[j])>k:
      flag=1
      break
    if flag==1:
      break
if flag==1:  
  print(":(")
else:
  print("Yay!")

Solution (Python):
A = [int(input()) for i in range(5)]
k = int(input())

def antena():
    for i in range(len(A) - 1):
        for j in range(len(A) - i - 1):
            if A [i+j+1] - A[i] > k:
                return ':('
    return 'Yay!'

print(antena())

Solution (Python):

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

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

Solution (Python):
inList = []
for i in range(5):
    inList.append(int(input()))
k = int(input())
kList = []
for i in range(5):
    for j in range(1, 5):
        kyori = int(abs(inList[i] - inList[j]))
        kList.append(kyori)
ansFlg = True
for i in kList:
    if k < i:
        ansFlg = False
if ansFlg:
    print('Yay!')
else:
    print(':(')

Solution (Python):
import sys
A = list()
for i in xrange(5):
    A.append(int(raw_input()))

k = int(raw_input())

flag = False
for i in xrange(4):
    for j in range(i+1, 5, 1):
        if A[j] - A[i] > k:
            flag = True

if flag: print ':('
else: print 'Yay!'

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

ant=[a,b,c,d,e]
for i in range(5):
    for j in range(5):
        if abs(ant[i]-ant[j]) > k:
            print(":(")
            quit()
print("Yay!")

Solution (Python):
A = [0]*5
for i in range(5):
    A[i] = int(input())
k = int(input())
if A[4]-A[0]>k:
    print(":(")
else:
    print("Yay!")

Solution (Python):
antenas = [int(input()) for i in range(5)]
k = int(input())
if k == 0:
    print('Yay!')
    exit()
print('Yay!') if max(antenas) - min(antenas) <= k else print(':(')

Solution (Python):
posi_list=[]
posi_list.append(int(input()))
posi_list.append(int(input()))
posi_list.append(int(input()))
posi_list.append(int(input()))
posi_list.append(int(input()))

k=int(input())
dis_list=0
for posi in posi_list:
    for other_posi in posi_list:
        if abs(other_posi-posi)>k:
            dis_list=1
            break
if dis_list==1:
    print(":(")
else:
    print("Yay!")

Solution (Python):
def ii2ss(n):
    ss = []
    for i in range(n):
        ss.append(input())
    return ss

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

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

def main(ss):
    nn0 = ss2nn(ss)
    nn = nn0[0:5]
    k = nn0[5]
    for i in range(5):
        for j in range(i+1, 5):
            if abs(nn[j] - nn[i]) > k:
                return ':('
    return 'Yay!'
ss = ii2ss(6)
print(main(ss))

Solution (Python):
A=[]
for i in range(6):
  A.append(int(input()))
X=A[4]-A[0]
if X<=A[5]:
  print("Yay!")
else:
  print(":(")

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

if k < b-a:
  print(':(')
elif k < c-a:
  print(':(')
elif k < d-a:
  print(':(')
elif k < e-a:
  print(':(')
elif k < c-b:
  print(':(')
elif k < d-b:
  print(':(')
elif k < e-b:
  print(':(')
elif k < d-c:
  print(':(')
elif k < e-c:
  print(':(')
elif k < e-d:
  print(':(')
else:
  print('Yay!')

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

k = int(input())

ans = "Yay!"

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

print(ans)

Solution (Python):
antennas = []
for _ in range(5):
    x = int(input())
    antennas.append(x)
k = int(input())

import itertools

ans = True
for x, y in list(itertools.combinations(antennas,2)):
    dist = abs(x - y)
    if dist > k:
        ans = False
        break

if ans == True:
    print('Yay!')
else:
    print(':(')

Solution (Python):
cities = []
for i in range(5):
  cities.append(int(input()))
k = int(input())
if cities[4] - cities[0] > k:
  print(':(')
else:
  print('Yay!')

Solution (Python):
A = int(input())
_ = input()
_ = input()
_ = input()
E = int(input())
k = int(input())

if (E-A) > k:
    print(":(")
else:
    print("Yay!")

Solution (Python):

import sys

import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

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

Solution (Python):
antena=[]
for i in range(0, 5):
    antena.append(int(input()))
k = int(input())
flag = 0
for i in range(0, 4):
    for j in range(i+1, 5):
        if antena[j]-antena[i]>k:
            flag = 1
if flag==0:
    print("Yay!")
else:
    print(":(")

Solution (Python):
a = [0, 0, 0, 0, 0]
for i in range(5):
    a[i] = (int)(input())
k = (int)(input())
isExist = "Yay!"

for d in [d+1 for d in range(4)]:
    for i in range(4):
        if i + d < 5 and (a[i+d] - a[i] > k):
            isExist = ":("

print(isExist)

Solution (Python):
a=int(input().strip())
b=int(input().strip())
c=int(input().strip())
d=int(input().strip())
e=int(input().strip())
k=int(input().strip())

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

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

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

Solution (Python):
"""
python3 main.py < input.txt
"""
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(':(')

Solution (Python):
import itertools

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

k = int(input())

x = [a,b,c,d,e]

res = 0
for i,j in itertools.combinations(x, 2):
  if abs(j - i) > k:
    res = 1
    print(':(')
    break

if res == 0:
	print('Yay!')

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

Solution (Python):
a_e = [int(input()) for i in range(5)]
k = int(input())
new_a_e = a_e.copy()
res = False
for i in range(len(a_e)):
    for j in range(len(new_a_e)):
        if i == j:
            del new_a_e[j]
        else:
            dis = abs(a_e[i]-a_e[j])
            if dis>k:
                print(':(')
                res = True
                break
    if res==True:
        break
if res==False:
    print('Yay!')

Solution (Python):
d = [int(input()) for i in range(5)]
k = int(input())

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

Solution (Python):
lst = [int(input()) for i in range(5)]
k = int(input())

for i in range(5):
  for j in range(i+1,5):
    tmp = lst[j] - lst[i]
    
    if tmp > k:
      break
  if tmp > k:
    print(":(")
    break
else:
  print("Yay!")

Solution (Python):
a = [int(input())for i in range(5)]
b = int(input())
A =  max(a)
B = min(a)

C = A-B
if C > b:
  print(':(')
else :
  print('Yay!')

Solution (Python):

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

Solution (Python):
A = [0] * 5
A[0] = int(input())
A[1] = int(input())
A[2] = int(input())
A[3] = int(input())
A[4] = int(input())
k = int(input())
exi = 0
for i in range(0,5):
    for j in range(i+1,5):
        if ((A[j]-A[i]) <= k):
            exi += 1
if (exi == 10):
    print("Yay!")
else:
    print(":(")

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

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

Solution (Python):
import itertools

ans = False
l = [int(input()) for i in range(5)]
limit = int(input())
c = list(itertools.combinations(l,2))
for i in c:
    if i[1] - i[0] > limit:
        ans = True
print("Yay!") if not ans else print(":(")

Solution (Python):
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
K = int(input())

lists=[]
lists.append(A)

lists.append(B)
lists.append(C)
lists.append(D)
lists.append(E)
import itertools 
T=list(itertools.combinations(lists,2))
ans =0
for i in T:
    if abs(i[0]-i[1]) > ans:
        ans = abs(i[0]-i[1])
if ans > K:
    print(':(')

else:
    print('Yay!')

Solution (Python):
A = [int(input()) for _ in range(5)]
K = int(input())

c = 0
for i, a in enumerate(A[:-1]):
	for j, b in enumerate(A[i+1:]):
		c += 1 if K < b - a else 0
print([":(", "Yay!"][not(0<c)])

Solution (Python):
import sys
 
 
a = int(sys.stdin.readline().strip())
b = int(sys.stdin.readline().strip())
c = int(sys.stdin.readline().strip())
d = int(sys.stdin.readline().strip())
e = int(sys.stdin.readline().strip())
k = int(sys.stdin.readline().strip())



l = [a,b,c,d,e]
l.sort(reverse=True)




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

Solution (Python):
antenas = [int(input()) for i in range(5)]
k = int(input())
for i in range(5):
    for j in range(5-i):
        if antenas[j] - antenas[i] > k:
            print(':(')
            break
    else:
        continue  
    break
else:
    print('Yay!')

Solution (Python):
tower = []
for i in range(6):
    point = int(input())
    tower.append(point)

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

Solution (Python):
lst = [int(input()) for i in range(5)]
k = int(input())
for i in range(5):
    for j in range(5):
        dif = lst[i] - lst[j]
        if abs(dif) > k :
            print(':(')
            exit()
print('Yay!')

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




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

Solution (Python):
import itertools

antenas = list(map(int, [input() for _ in range(5)]))
k = int(input())
c_list = list(itertools.combinations(antenas, 2))

for combi in c_list:
    length = abs(combi[0] - combi[1])
    if length > k:
        print(':(')
        exit()
print('Yay!')

Solution (Python):
import itertools
l = [int(input()) for i in range(5)]
k = int(input())
for i in itertools.combinations(l, 2):
  if i[1] - i[0] > k:
    print(':(')
    exit()
print('Yay!')

Solution (Python):
ants = [0]*5
for i in range(5):
  ants[i] = int(input())
k = int(input())
if max(ants) - min(ants) > k:
  print(':(')
else:
  print('Yay!')

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

if (max(a)-min(a)) > input():
    print(":(")
else:
    print("Yay!")

Solution (Python):
min = int(input())
max = min
for i in range(4):
    x = int(input())
    min = x if x < min else min
    max = x if x > max else max
k = int(input())
print('Yay!' if max-min <= k else ':(')

Solution (Python):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
lis = [a, b, c, d, e]
for i in lis:
    for j in lis:
        dif = abs(i - j)
        if dif > k:
            print(":(")
            break
    else:
        continue
    break
else:
    print("Yay!")

Solution (Python):
import sys

input = sys.stdin.readline

lis = [int(input()) for _ in range(6)]

ret = True

for i in range(6):
    for j in (range(i+1, 6)):
        if (abs(lis[i] - lis[j]) > lis[5]):
            ret = False
            break


if (ret == True):
    print('Yay!')
else:
    print(':(')

Solution (Python):
import itertools

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

count = 0
for p, q in itertools.combinations([a, b, c, d, e], 2):
    if abs(p - q) > k:
        print(':(')
        break
    else:
        continue
else:
    print('Yay!')

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

Solution (Python):


list = []
list.append(int(input()))
list.append(int(input()))
list.append(int(input()))
list.append(int(input()))
list.append(int(input()))
k = int(input())

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

Solution (Python):
import sys
arr = [0]*5
for i in range(5):
    arr[i] = int(input())
k = int(input())

for j in range(5):
    for n in range(j+1, 5):
        if (arr[n] - arr[j]) > k:
            print(':(')
            sys.exit()
print('Yay!')

Solution (Python):
a = []
for i in range(0, 5):
    a.append(int(input()))

k = int(input())
f = True

for i in range(0, 5):
    for j in range(i + 1, 5):
        if f and a[j] - a[i] > k:
            f = False
            print(":(")

if f:
    print("Yay!")

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

Solution (Python):




n = [int(input()) for i in range(5)]
    
k = int(input())

ans = 0

for i in range(5):
    for j in range(5)[i+1:]:
        if n[j]-n[i]>k:
            ans+=1
            
if ans == 0:
    print("Yay!")
else:
    print(":(")

Solution (Python):
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!")

Solution (Python):
a = int(input())                                                        
b = int(input())                                                        
c = int(input())                                                        
d = int(input())                                                        
e = int(input())                                                        
k = int(input())                                                        
                                                                        
ok = "Yay!"                                                             
ng = ":("                                                               
                                                                        
dots = [a, b, c, d, e]                                                  
                                                                        
for i, p in enumerate(dots):                                            
    for q in dots[i:]:                                                  
        d = q-p                                                         
        if d <= k:                                                      
            None                                                        
        else:                                                           
            print(ng)                                                   
            exit()                                                      
                                                                        
print(ok)

Solution (Python):
import sys

def parse(inp):
    anntena = [int(next(inp).split()[0]) for _ in range(5)]
    k=int(next(inp).split()[0])
    return anntena,k
  
def main(inp):
    anntena,k=inp
    
    for i in range(4):
        for j in range(i+1,5):
            if(abs(anntena[i]-anntena[j])>k):
                return """:("""
    return """Yay!"""
  
print(main(parse(sys.stdin)))

Solution (Python):
L = [int(input()) for i in range(5)]
k = int(input())
c = 0
for i in range(5):
    for j in range(5):
        if i != j and abs(L[i]-L[j]) > k:
            c = 1
if c == 1:
    print(':(')
else:
    print('Yay!')

Solution (Python):



def solv(a, b, c, d, e, k):
    ants = [a, b, c, d, e]
    for i in range(1, len(ants)):
        for j in range(i):
            if abs(ants[i] - ants[j]) > k:
                return ':('
    return 'Yay!'


if __name__ == '__main__':

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

    ans = solv(a, b, c, d, e, k)

    print(ans)

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

ants = [a, b, c, d, e]
txt = 'Yay!'

for i in range(len(ants)):
    for j in range(len(ants)):
        if i != j and abs(ants[i] - ants[j]) > k:
            txt = ':('

print(txt)

Solution (Python):
west = 123
east = 0
for i in range(5):
    x = int(input())
    west = min(x,west)
    east = max(x,east)


if east - west <= int(input()):
    print('Yay!')
else:
    print(':(')

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

BCDE = [b,c,d,e]
CDE = [c,d,e]
DE = [c,d]

l = 0

Yay = True

for later_point in BCDE:
    l = later_point - a
    if l > k:
        Yay = False

for later_point in CDE:
    l = later_point -b
    if l > k:
        Yay = False

for later_point in DE:
    l = later_point - c
    if l > k:
        Yay = False

if e - d > k :
    Yay = False

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

Solution (Python):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
l =[a,b,c,d,e]
count = 0
for i in range(5) :
    for j in range(i + 1) :
        if abs(l[i] - l[j]) > k :
            count = 1

if count == 0 :
    print("Yay!")
else :
    print(":(")

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

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

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

li = [a, b, c, d, e]
distance = max(li) - min(li)

if distance > k:
    ans = ':('
else:
    ans = 'Yay!'
    
print(ans)

Solution (Python):
import sys


def main():
    h = [int(input()) for count in range(6)]
    k = h[5]
    for i in range(len(h) - 1):
        for j in range(len(h) - 1):
            if abs(h[i] - h[j]) > k:
                print(":(")
                sys.exit()
    print("Yay!")


if __name__ == '__main__':
    main()

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

array = [a,b,c,d,e]
flag = True

for i in range(0, 4):
    for j in range(i+1, 5):
        if abs(array[i] - array[j] )> k:
            flag = False
            break
            
if flag:
    print('Yay!')
else:
    print(':(')

Solution (Python):
n = [int(input()) for i in range(5)]
n.sort()
k=int(input())
if n[4] - n[0] > k:
    print(":(")
else:
    print("Yay!")

Solution (Python):
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(a-c)>k or abs(a-d)>k or abs(a-e)>k or abs(b-c)>k or abs(b-d)>k or abs(b-e)>k or abs(c-d)>k or abs(c-e)>k or abs(d-e)>k:
  print(':(')
else:
  print('Yay!')

Solution (Python):
dis = [int(input()) for i in range(5)]
k = int(input())

diss = [abs(a-b) for a in dis for b in dis]
if max(diss) > k:
    print(':(')
else:
    print('Yay!')

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

ans = "Yay!"

for i in range(5):
    for j in range(5):
        if abs(a[i]-a[j]) > k:
            ans = ":("

print(ans)

Solution (Python):
import sys

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

ae = [a, b, c, d, e]
for i in range(len(ae)-1):
    for j in range(i+1):
        if ae[i+1] - ae[j] > k:
            print(':(')
            sys.exit()

print('Yay!')

Solution (Python):
t = [int(input()) for i in range(5)]
n = int(input())
t.sort()
a =t[4]-t[0]
if n >= a :
    print("Yay!")
else:
    print(":(")

Solution (Python):
inputs = [int(input()) for _ in range(6)]

def check(n1, n2):
    return abs(inputs[n1] - inputs[n2]) <= inputs[5]

if check(0, 1) and check(0, 2) and check(0, 3) and check(0, 4) and check(1, 2) and check(1, 3) and check(1, 4) and check(2, 3) and check(2, 4) and check(3, 4):
    print("Yay!")
else:
    print(":(")

Solution (Python):
a=[]
for i in range(5):
    a.append(int(input()))
k = int(input())
d=[]
for i in range(5):
    for j in range(5):
        if a[i] - a[j] > k:
            print(":(")
            break
    else:
        continue
    break
else:
    print("Yay!")

Solution (Python):
a=[int(input()) for j in range(5)]
k=int(input())

flag=0
for i in range(5):
  for j in range(5):
    if abs(a[i]-a[j]) > k:
      flag=1

print(':(' if flag==1 else 'Yay!')

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

in_list = [a,b,c,d,e]
flag = True
for i in in_list:
	for j in in_list:
		if i - j > k:
			flag = False
if flag:
	print('Yay!')
else:
	print(':(')

Solution (Python):
an = [int(input()) for i in range(5)]
k = int(input())

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

Solution (Python):
import sys
input = sys.stdin.readline

length_list = [int(input()) for _ in range(5)]
k = int(input())
a = length_list[0]
flag = True
for i in range(len(length_list)-1, 0, -1):
    if length_list[i] - a > k:
        print(':(')
        flag = False
        break
if flag:
    print('Yay!')

Solution (Python):






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

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

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

if b - a <= k and c - a <= k and d - a <= k and e - a <= k and c - b <= k and d - b <= k and e - b <= k and d - c <= k and e - c <= k and e - d <= k:
    print('Yay!')

else:
    print(':(')

Solution (Python):
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
ant=[a,b,c,d,e]
def antenna(ant,k):
  for i in range(4):
    for ii in range(1,5):
      if ant[ii]-ant[i]>k:
        return ":("
  else:
    return "Yay!"
print(antenna(ant,k))

Solution (Python):
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(':(')

Solution (Python):
C = []

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

k = int(input())

result = "Yay!"
for i in range(5):
	for j in range(i+1,5):

		if C[j] - C[i] > k:
			result = ":("

print(result)

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

zahyo = [a,b,c,d,e]

def ite(zahyo):
    for z in zahyo:
        for z_ in zahyo:
            if z==z_ or z > z_ :
                continue
            else:
                if z_ - z > k:
                    print(":(")
                    return None
    print("Yay!")
    return None
ite(zahyo)

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

Solution (Python):
a = [int(input()) for _ in range(5)]
k = int(input())
ans = False
for i in a:
    for j in a:
        if abs(i - j) > k:
            ans = True
print (':(' if ans else 'Yay!')

Solution (Python):
import sys
a = []
for i in range(5):
    a.append(int(input()))
k = int(input())
for i in range(5):
    for j in range(5):
        if a[i] - a[j] > k:
            print(':(')
            sys.exit()
print('Yay!')

Solution (Python):
import numpy as np

num = [] 

for i in range(5): 
    a = input()
    num.append(int(a))

k=int(input())

num.sort()

ran=num[4]-num[0]

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

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

Solution (Python):
a_k = [int(input()) for _ in range(6)]

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

Solution (Python):
a = []
b = "Yay!"
for i in range(6):
    a.append(int(input()))
for i in range(5):
    for j in range(5):
        if a[5-i] - a[j] > a[5]:
            b = ":("
print(b)

Solution (Python):
a = [int(input()) for i in range(5)]
k = int(input())

ans = 0
for i in range(5):
    for j in range(i+1,5):
        if abs(a[i]-a[j]) <= k:
            ans += 1
if ans == 10:
    print("Yay!")
else:
    print(":(")

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

Solution (Python):
ans='Yay!'
data=[]
for i in range(5):
    data.append(int(input()))

K=int(input())
for i in range(5):
    for j in  range(i,5):
        if abs(data[i]-data[j])>K:
            ans=':('
            break

print(ans)

Solution (Python):
inp = []
for i in range(6):
    inp.append(int(input()))
k = inp[4] - inp[0]
if k > inp[5]:
    print(':(')
else:
    print('Yay!')

Solution (Python):
import sys

a = int(sys.stdin.readline())
b = int(sys.stdin.readline())
c = int(sys.stdin.readline())
d = int(sys.stdin.readline())
e = int(sys.stdin.readline())
k = int(sys.stdin.readline())
ret = ':(' if k < (e - a) else "Yay!"
print(ret)

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

Solution (Python):
import sys

antena = [0]*5

for i in range(5):
    antena[i] = int(input())
    
K = int(input())


for i in range(5):
    for j in range(i+1,5):
        if abs(antena[j]-antena[i]) > K:
            print(":(")
            sys.exit(0)

print("Yay!")

Solution (Python):
import sys


def solve(lines):
    lines = [int(x) for x in lines]

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

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


if __name__ == '__main__':
    lines = sys.stdin.read()
    lines = lines.strip().split('\n')
    solve(lines)

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

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

Solution (Python):

from itertools import product
from collections import defaultdict
def inpl(): return list(map(int, input().split()))

X = [0]*6
for i in range(6):
    X[i] = int(input())
a, b, c, d, e, k = X

for l, r in product(X[:5], repeat=2):
    if abs(l-r) > k:
        print(":(")
        break
else:
    print("Yay!")

Solution (Python):
x = sorted([int(input()) for _ in range(5)])
k = int(input())

print(':(' if x[::-1][0] - x[0] > k else 'Yay!')

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

k = int(input())

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

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

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

k= int(input())

for i in range(4):
    for j in range(i+1, 5):
        if c[j] - c[i] > k:
            print(':(')
            quit()

print('Yay!')

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

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

Solution (Python):
lst = [int(input()) for _ in range(5)]
k = int(input())
for x in lst:
    for y in lst:
        if k < y - x:
            print(':(')
            exit(0)
print('Yay!')

Solution (Python):
a = []
for i in range(5):
  a.append(int(input()))
k=int(input())
for l in range(5):
    for i in range(5):
        if abs(a[l]-a[i])>k:
            print(':(')
            exit()
print('Yay!')

Solution (Python):
import sys,collections,math;sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

lis = []
for i in range(6):
    lis.append(I())
k = lis[5]
if lis[4] - lis[0] > k:
    print(":(")
else:
    print("Yay!")

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

fl = True
for i in li:
  for j in li:
    if abs(i-j) > k:
      fl = False
print('Yay!' if fl == True else ':(')

Solution (Python):
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!")

Solution (Python):
a=sorted([int(input()) for _ in range(5)])
k=int(input())
print("Yay!" if abs(a[0]-a[4])<=k else ":(")

Solution (Python):
def main():
    antenas = []

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

    k = int(input())

    antenas.sort()

    for a in antenas[1:]:
        if a - antenas[0] > k:
            print(':(')
            return

    print('Yay!')


main()

Solution (Python):
antenas = []
for i in range(5):
    antenas.append(int(input()))
    
k = int(input())

flag = False
for antena1 in reversed(antenas):
    for antena2 in antenas:
        if antena1 - antena2 > k:
            flag = True
if flag:
    print(":(")
else:
    print("Yay!")

Solution (Python):
from itertools import combinations

lst = [int(input()) for _ in range(6)]
lst_ = lst[0:5]
k = lst[5]


comb = list(combinations(lst_, 2))


ans = "Yay!"
for c in comb:
    tmp = abs(c[0] - c[1])
    
    if tmp > k:
        ans = ":("

print(ans)