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):
input0 = int(input())
input1 = int(input())
input2 = int(input())
input3 = int(input())
input4 = int(input())
K = int(input())

list = (input0,input1,input2,input3,input4)
max = max(list)
min = min(list)
fig = max - min

if fig <= K :
    print ("Yay!")
else :
    print (":(")

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

Solution (Python):
a=[int(input()) for i in range(5)]
k=int(input())
if max(a)-min(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())

def check(one, two, k):
	if abs(one - two) <= k:
		return 0
	else:
		return 1

cnt = 0

if check(a,b,k) == 1:
	cnt += 1
if check(a,c,k) == 1:
	cnt += 1
if check(a,d,k) == 1:
	cnt += 1
if check(a,e,k) == 1:
	cnt += 1
if check(c,b,k) == 1:
	cnt += 1
if check(d,b,k) == 1:
	cnt += 1
if check(e,b,k) == 1:
	cnt += 1
if check(c,d,k) == 1:
	cnt += 1
if check(c,e,k) == 1:
	cnt += 1
if check(d,e,k) == 1:
	cnt += 1
if check(a,b,k) == 1:
	cnt += 1
if cnt >= 1:
	print(":(")
else:
	print("Yay!")

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

if (li[4] - li[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 k < e - a:
  print(":(")
else:
  print("Yay!")

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

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

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

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

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

print("Yay!" if E-A <= K else":(")

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


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

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

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

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

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

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

Solution (Python):
locs = [int(input()) for _ in range(5)]
k = int(input())
flag = False

for i in range(5-1):
    for j in range(i+1,5):

        if locs[j] - locs[i] > k:
            print(':(')
            flag = True
            break
    
    if flag:
        break

if not flag:
    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):




antena = []
ans = "Yay!"

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

k = int(input())

for i in range(len(antena)):
    for j in range(i+1, len(antena)):
        dist = abs(antena[j] - antena[i])
        if dist > 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 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 = [int(input()) for i in range(5)]
k = int(input())
d = max(A) - min(A)
print("Yay!" if d <= k else  ":(")

Solution (Python):
antenna = list()
for _ in range(5):
    antenna.append(int(input()))
k = int(input())

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

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

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

Solution (Python):
I = [int(input()) for i in range(6)]
print('Yay!' if I[-2] - I[0] <= I[-1] else ':(')

Solution (Python):
a=[]
for i in range(5):a.append(int(input()))
k=int(input())
a.sort()
print(":(" if a[4]-a[0]>k else "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):
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 and e-b<=k and e-c<=k and e-d<=k:
 print('Yay!')
else:
 print(':(')

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


i = [a[0], a[1], a[2], a[3], a[4]]
k = a[5]

flag = False
itr = 0
while True:
  x = itr
  while True:
    x+=1
    if x >= 5:
      break
    elif(i[x] - i[itr]) > k:
      flag = True
  itr+=1
  if itr == 5:
    break
    
if flag:
  print(":(")
else:
  print("Yay!")

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

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

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

Solution (Python):



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

k = int(input())

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

Solution (Python):
a,b,c,d,e,k = (int(input()) for i in range(6))

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

Solution (Python):
from sys import stdin
import sys
a,b,c,d,e = [ int(stdin.readline().rstrip()) for _ in range(5) ]
k = int(stdin.readline().rstrip())
if ( e - a ) > k :
    print(":(")
    sys.exit()
print("Yay!")

Solution (Python):


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

b = int(input())

c = 0
count = 0


for i in a:
    for j in a:
        c = j - i

        if c > b:
            count += 1

if count >= 1:
    print(':(')
else:
    print('Yay!')

Solution (Python):
from itertools import combinations

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

for i, j in combinations(s, 2):
    if k < abs(i - j):
        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 - a <= k :
    print( "Yay!" )
else :
    print( ":("  )

Solution (Python):
a = []
for i in range(5):
  a.append(int(input()))
 
k = int(input())
 
a.sort()
if a[-1]-a[0] <= 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(":(")
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):
li = [int(input()) for i in range(5)]
k = int(input())

flag = 1

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

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

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

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

Solution (Python):
*a, = map(int, open(0).read().split())
k = a.pop()

c = 'Yay!'
for i in a:
    for j in a:
        if j-i > k:
            c = ':('
            break
print(c)

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

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

Solution (Python):
s = [int(input()) for i in range(6)]
result = True
for i in range(5):
    for j in range(i+1, 5):
        if s[j] - s[i] > s[5]:
            result = False
            break

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

Solution (Python):
nums = []
for i in range(5):
    nums.append(int(input()))
k = int(input())
s = "Yay!"
for i in range(5):
    for m in range(5 - i):
        a = nums[i]
        if abs(a - nums[m]) > k:
             s = ":("
             break
print(s)

Solution (Python):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
print("Yay!" if e - a <= k 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('Yay!')
else:
    print(':(')

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

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

if max(list) - min(list) > 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())

list = [b-a, c-a, d-a, e-a, c-b, d-b, e-b,
        d-c, e-c, e-d]

if max(list) > 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):
input_nums = []
input_count = 5

for i in range(0,input_count):
  input_nums.append(int(input()))

allowed_distance = int(input())

for i in range(0,input_count):
  for j in range(i+1,input_count):
    
    if (input_nums[j] - input_nums[i]) > allowed_distance:
      print(':(')
      exit()

print('Yay!')

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

k = int(input())

ae_length = e-a

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

Solution (Python):
li = []
for i in range(5):
    li.append(int(input()))
else:
    k = int(input())
    if abs(li[0] - li[4]) <= 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):
s = [input() for i in range(6)]

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

Solution (Python):
a = []
b = []
for i in range(5):
    a.append(int(input()))
k = int(input())
for i in range(len(a)):
    for j in range(len(a)):
        ans = abs(a[i] - a[j])
        b.append(ans)
        
for i in b:
    if k < i:
        print(":(")
        exit()
print('Yay!')

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

def anthennas(nums, k):
  if nums[-1] - nums[0] <= k:
      return "Yay!"
  return ":("
  
  
print(anthennas(nums, k))

Solution (Python):
import sys

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

k = int(input())

for i in range(4):
    for j in range(i+1, 5):
        if(antenna[j] - antenna[i] > k):
            print(":(")
            sys.exit()

print('Yay!')

Solution (Python):
def solve(start, end, limit):
    
    return ":(" if end - start > limit else "Yay!"


def main():
    a = int(input())
    b = int(input())
    c = int(input())
    d = int(input())
    e = int(input())
    k = int(input())

    ans = solve(a, e, k)
    print(ans)


main()

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

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

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

k=int(input())
f=1

for i in range(len(li)):
    for j in range(i+1, len(li)):
        if abs(li[i]-li[j])>k:
            f=0

if f:
    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):


NUM_ANTENNAS = 5
antennas = list()
for _ in range(NUM_ANTENNAS):
    antennas.append(int(raw_input()))
k = int(raw_input())
print 'Yay!' if (antennas[-1]-antennas[0]) <= k else ':('

Solution (Python):
antenna = []
bool = True

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

antenna.sort()
if abs(antenna[0] - antenna[-1]) > max_distance:
    bool = False
    
if bool:
    print("Yay!")
else:
    print(":(")

Solution (Python):
antenna = []
bool = True

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

for i in range(5):
    for j in range(5):
        if abs(antenna[i] - antenna[j]) > max_distance:
            bool = False
            
if bool:
    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 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())

ans = True
x = [a,b,c,d,e]
dist = max(x) - min(x)
if dist > k:
    ans = False

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

Solution (Python):
list = []
for i in range(5):
  list.append(int(input()))
list = list[::-1]
k = int(input())
dist = 0
j = 0
cant_connect = False
for i in range(5):
  for j in range(i+1, 5):
    dist = list[i] - list[j]
    if dist > k:
      cant_connect = True
      break
  if cant_connect:
    break
if cant_connect:
  print(":(")
else:
  print("Yay!")

Solution (Python):
a=[]

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

k=int(input())
for i in range(5):
    for j in range(5):
        if(i==j):
            continue
        else:
            if(abs(a[i]-a[j])>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-a > k :
	print(":(")
else:
	print("Yay!")

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

if nums[4] - nums[0] > nums[5]:
  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(max(a,b,c,d,e) - min(a,b,c,d,e) > k):
    print(":(")
else:
    print("Yay!")

Solution (Python):


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

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):
def Antennas(a,b,c,d,e,k):
    if (b-a)>k or (c-a)>k or (d-a)>k or (e-a)>k:
        return ':('
    else:
        return 'Yay!'

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
print(Antennas(a,b,c,d,e,k))

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

List = [a,b,c,d,e]
if max(List) - min(List) <= 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())
f = b-a
g = c-a
h = d-a
i = e-a
j = c-b
l = d-b
m = e-b
n = d-c
o = e-c
p = e-d
if f<=k and g<=k and h<=k and i<=k and j<=k and l<=k and m<=k and n<=k and o<=k and p<=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())
for i,j in itertools.combinations([a,b,c,d,e], 2):
    if abs(i-j)>k:
        print(':(')
        exit()
print('Yay!')

Solution (Python):
l = []

for i in range(5):
    l.append(int(input()))
k = int(input())

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

Solution (Python):
a=[]
for i in range(5):
    a.append(int(input()))
k = int(input())
for i in range(5):
    for j in range(i+1,5):
        if abs(a[i]-a[j]) > 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 max(a,b,c,d,e) -min(a,b,c,d,e) > 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):
list1=[int(input()) for i in range(5)]
k=int(input())
count=0
for i in range(5):
    for j in range(i):
        if list1[i]-list1[j]<=k:
            count+=1
str1=":("
if count==10:
    str1="Yay!"
print(str1)

Solution (Python):
import numpy as np
line = np.zeros([5,])
for i in range(0,5):
    line[i] = int(input())

k = int(input())
if line.max()-line.min()>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):
List = []
List.append(int(input()))
List.append(int(input()))
List.append(int(input()))
List.append(int(input()))
List.append(int(input()))
k = int(input())

CW = []
for i in range(len(List)):
    for j in range(i+1,len(List)):
        if List[j]-List[i] <= k:
            CW.append(True)
        else:
            CW.append(False)

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

Solution (Python):
import sys
if __name__ == "__main__":
    N=6
    in_lst=[]
    for _ in range(N):
        in_lst.append(int(input()))
    for i in in_lst[:-1]:
        for j in in_lst[:-1]:
            if j-i>in_lst[-1]:
                print(':(')
                sys.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-a) <= k:
    print('Yay!')
else:
    print(':(')

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

ret = "Yay!"
for i ,coordinate_i in enumerate(antenna):
    for i ,coordinate_j in enumerate(antenna):
        if k < abs(coordinate_i - coordinate_j):
            ret = ":("

print(ret)

Solution (Python):
L=[]
for i in range(5) :
  L.append(int(input()))
K=int(input())
if (L[-1]-L[0]) > K :
  print(":(")
else :
  print("Yay!")

Solution (Python):
a=(int(input()));input();input();input();b=(int(input()))
if int(input()) >= b-a:
	print("Yay!")
else:
	print(":(")

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

if (data[4]-data[0] <= data[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 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 e-a<=k: 
    print("Yay!")
else :
    print(":(")

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

k = int(input())

if pos[4] - pos[0] <= 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(":(")
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):
arr=[]
for i in range(5):
    arr.append(int(input()))
k = int(input())

i=0
singi=0
if k >= arr[4] - arr[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('Yay!')
else:
    print(':(')

Solution (Python):



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

d = a[4] - a[0]
print(':(' if d > k else 'Yay!')

Solution (Python):
import itertools
import sys

def main():
    n = []
    for i in range(5):
        n.append(int(input()))
    k = int(input())
    for c in itertools.combinations(n, 2):
        if abs(c[0] - c[1]) > k:
            print(':(')
            sys.exit()
    else:
        print('Yay!')

if __name__ == '__main__':
    main()

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

Solution (Python):
arr=[0,0,0,0,0,0]
for i in range(0,6):
	arr[i]=int(input())

if arr[4]-arr[0] > arr[5]:
	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):
atoe =[int(input()),int(input()),int(input()),int(input()),int(input())]
k = int(input())

maxNum = 5
_err = 0
for i in range(0, maxNum):
    for j in range(i+1, maxNum):
        if abs(atoe[i] - atoe[j]) > k:
            _err = 1

if _err:
    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):
def main():
    if sub():
        print("Yay!")
    else:
        print(":(")


def sub() -> bool:
    a = int(input())
    b = int(input())
    c = int(input())
    d = int(input())
    e = int(input())
    points = [a, b, c, d, e]
    k = int(input())

    for i in points:
        for j in points:
            if abs(i - j) <= k:
                continue
            else:
                return False
    return True


if __name__ == '__main__':
    main()

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):
import sys

a = int(input())
e = int(input())
e = int(input())
e = int(input())
e = int(input())
k = int(input())

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

Solution (Python):
def antena(k,p,q):
    if((p-q) >k):
        return False
    else:
        return True

x = [0 for i in range(6)]
for i in range(6):
    x[i] = int(input())

for i in range(5):
    for j in range(5):
        if(not antena(x[i],x[j],x[5])):
            print(":(")
            exit()

print("Yay!")

Solution (Python):
import os
import sys



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

for i in reversed(range(0,5)):
    for x in reversed(range(1,i+1)):
        if(a[i]-a[x-1]>a[5]):
            print(":(")
            sys.exit()
print("Yay!")

Solution (Python):
a=input()
for i in range(3):
  input()
e=input()
k=input()
if int(e)-int(a)<=int(k):
  print("Yay!")
else:
  print(":(")

Solution (Python):
p = -1
q = 124

for _ in range(5):
    a = int(input())
    p = max(p, a)
    q = min(q, a)
    
k = int(input())

if p - q <= 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):
p = -1
q = 124

for _ in range(5):
  a = int(input())
  p = max(p, a)
  q = min(q, a)

k = int(input())

if p - q <= k:
  print('Yay!')
else:
  print(':(')

Solution (Python):


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

K = int(input())

if L[4]-L[0]<=K:
    ans = 'Yay!'
else:
    ans = ':('

print(ans)

Solution (Python):
X = []




for _ in range(5):
    X.append(int(input()))  
k = int(input())

for x in range(len(X)):
    for y in range(x+1, len(X)):
        

        if k < X[y] - X[x]:
            print(':(')
            exit()
print('Yay!')

Solution (Python):
a,*_,e,k=map(int,open(0));print(("Yay!",":(")[e-a>k])

Solution (Python):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
n = 0
if e-a > k or e-b > k or d-a > k or e-c > k or d-b > k or c-a > k or e-d > k or d-c > k or c-b > k or b-a > k:
    n = 1

if n == 1:
    print(":(")
if n == 0:
    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,b,c,d,e,k=[int(input()) for i in range(6)]
if e-a > k :  print(":(")
else : print("Yay!")

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

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

Solution (Python):
import sys
list = [int(input()) for _ in range(6)]
for i in range(5):
  for j in range(i+1, 5):
    if list[j] - list[i] > list[5]:
      print(':(')
      sys.exit()
print('Yay!')

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


def find(array, k):
    for i in range(5):
        for j in range(5):
            if(i != j):
                if(array[i]-array[j] > k):
                    return False
    return True


result = "Yay!" if find(array, k) == True else ":("
print(result)

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

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

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

f  = True 

la = [a,b,c,d,e]
lb = [a,b,c,d,e]

for e, v in enumerate(la):
    for e2,v2 in enumerate(lb):
        if e < e2:
            if v2 - v > x:
                f = False

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

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

Solution (Python):
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
list=[a,b,c,d,e]
ans='Yay!'

for i in list:
  for j in list:
    if j-i > k:
      ans=':('
      
print(ans)

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

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

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

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

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

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

if max(A) - min(A) <= k:
    print('Yay!')
else:
    print(':(')

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

print("Yay!" if max(antenna) - min(antenna) <= k else ":(")

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

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

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

b=[]
b.append(abs(a[0]-a[1]))
b.append(abs(a[0]-a[2]))
b.append(abs(a[0]-a[3]))
b.append(abs(a[0]-a[4]))
b.append(abs(a[2]-a[3]))
b.append(abs(a[2]-a[1]))
b.append(abs(a[3]-a[1]))
b.append(abs(a[4]-a[1]))
b.append(abs(a[2]-a[4]))
b.append(abs(a[3]-a[4]))

for i in range(0,10):
    if a[5]<b[i]:
        print(':(')
        break
    else:
        if i==9:
            print('Yay!')
        else:
            continue

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,b,c,d,e,k = (int(input()) for i in range(6))
print("Yay!" if e-a<=k else ":(")

Solution (Python):
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) <= 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(":(")
else:
	print("Yay!")

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

city = [e, d, c, b, a]
result = 'Yay!'
for i, c in enumerate(city):
    for u in city[i + 1:len(city)]:
        if (c - u) > k:
            result = ':('
            break;
print(result)

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

city = [e,d, c, b, a]
result = 'Yay!'
for i, c in enumerate(city):
    for cC in city[i + 1:len(city)]:
        if (c - cC) > k:
            result = ':('
            break;
print(result)

Solution (Python):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
list=[]
list.append(a)
list.append(b)
list.append(c)
list.append(d)
list.append(e)
if max(list)-min(list)>k:
    print(":(")
else:
    print("Yay!")