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, = map(int, open(0).read().split())
k = a[5]
a = a[:5]
o = "Yay!"
for i in range(4):
    for j in range(i+1, 5):
        if a[j]-a[i]>k:
            o = ":("
print(o)

Solution (Python):


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

length = e - a

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

Solution (Python):
ls = [int(input()) for i in range(5)]
print('Yay!' if ls[4]-ls[0] <= int(input()) 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]

j = True

for i in range(len(lis)):
  for m in range(len(lis)):
    if abs(lis[i] - lis[m]) > k:
      j = False
    else:
      pass
    
if j:
  print("Yay!")
else:
  print(":(")

Solution (Python):
s=[int(input()) for i in range(6)]
a=0
b=0
for j in range(5):
  for k in range(5):
    if j==k:
      continue
    else:
      if abs(s[j]-s[k])>s[5]:
        a+=1
if 0==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())
if (e-a)<=k:
  print('Yay!')
else:
  print(':(')

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

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

print('Yay!')

Solution (Python):
x = [int(input()) for i in range(5)]
k = int(input())
flag = 0
for i in range(5):
  for j in range(4):
    if x[i] - x[j] > k:
      flag = 1
else:
  if flag == 1:
    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 b-a > k:
  print(':(')
  exit()
elif c-a > k:
  print(':(')
  exit()
elif d-a > k:
  print(':(')
  exit()
elif e-a > k:
  print(':(')
  exit()
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):
import sys
from io import StringIO
import unittest

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """1
2
4
8
9
15"""
        output = """Yay!"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """15
18
26
35
36
18"""
        output = """:("""
        self.assertIO(input, output)

def resolve():
    a=[int(input()) for i in range(5)]
    k=int(input())
    for i in range(4):
        for j in range(i+1,5):
            if a[j]-a[i]>k:
                print(':(')
                return()
    else:
        print('Yay!')


if __name__ == "__main__":
    resolve()

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

k = int(input())

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

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

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

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

distance = []
for i in range(4):
    for j in range(i + 1, 5):
        distance.append(anntena[j] - anntena[i])
    
tmp = [i for i in distance if i  > k ]
if len(tmp) == 0:
    print("Yay!")
else:
    print(":(")

Solution (Python):
import itertools

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

combs = itertools.combinations(plots, 2)
for comb in combs:
    if abs(comb[0]-comb[1]) > k:
        print(":(")
        exit()

print("Yay!")

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

Solution (Python):
lst = []
for _ in range(5):
    lst.append(int(input()))
k = int(input())
if abs(lst[0] - lst[-1]) <= k:
    print('Yay!')
else:
    print(':(')

Solution (Python):
N = 5
lst = []
for e in range(N):
    lst.append(int(input()))
k = int(input())
flag = True
for i,a in enumerate(lst):
    if not flag:
        break
    l = lst[i:]
    for b in l:
        if abs(a-b) > k:
            flag = False
            break
if flag:
    print('Yay!')
else:
    print(':(')

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):
a = []
for i in range(6):
    a.append(int(input()))
    
flag = True

for i in range(4):
    for j in range(i+1,5):
        if abs(a[i]-a[j]) > a[5]:
            flag = False
            break
if flag == True:
    print("Yay!")
else:
    print(":(")

Solution (Python):
a = [int(input()) for _ in range(5)]
k = int(input())
for i in range(len(a)):
  for j in range(i+1,len(a)):
    if abs(a[i]-a[j])>k:
      print(":(")
      quit()
print("Yay!")

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

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

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

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

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

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):
first_num = int(input())
 
for i in range(3):
  passed_num = int(input())

end_num = int(input())
  
k = int(input())  
print('Yay!' if end_num - first_num <= k else ':(')

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

p = [a, b, c, d, e]
count = 0
for i in range(5):
    for j in range(i, 5):
        if p[j] - p[i] > k:
            count += 1
            break
if count > 0:
    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 = 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):

antennas = [0]* 5
for i in range(5):
    antennas[i] = int(input())
k = int(input())
connectable = True
for i in range(5):
    for j in range(i+1, 5):
        if (antennas[j] - antennas[i]) > k:
            connectable = False
if connectable:
    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):

l = []
for _ in range(5):
  l.append(int(input()))
k = int(input())
if l[-1] - l[0] > k:
  print(':(')
else:
  print('Yay!')

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

Solution (Python):
a=list(int(input()) for _ in range(5))
k=int(input())
print(":(" if a[4]-a[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 (e-a)>k:
    print(':(')
else:
    print('Yay!')

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

out = 0
for i in range(5):
    for j in range(i+1,5):
        if ABCDE[j] - ABCDE[i] > K:
            out += 1
            break

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

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

Solution (Python):
a = [int(input())for i in range(5)]
k = int(input())
cnt = 0
for i in a:
    for j in a:
        if abs(i-j) > k:
            print(':(')
            cnt += 1
            break
    else:
        continue
    break
if cnt == 0:
    print('Yay!')

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

Solution (Python):
a = []
for i in range(5):
    a.append(int(input()))
k = int(input())
fl = 0
for i in range(5):
    for j in range(i,5):
        if a[j] - a[i] > k:
            fl = 1

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

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

Solution (Python):
from itertools import combinations

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

res = True
for a, b in combinations(xs, 2):
    if abs(a - b) > k:
        res = False
        break
print("Yay!" if res else ":(")

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

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


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

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

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

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

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

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

Solution (Python):
*a,k=map(int,open(0))
print("Y:a(y !"[a[4]-a[0]>k::2])

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

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

d = L[4] - L[0]

if d > L[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('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):
s = []
for i in range(5):
	s.append(int(input()))
k = int(input())

r = "Yay!"
for i in range(5):
	if (r == ":("):
		break
	for n in range(i+1, 5):
		if((s[n] - s[i]) > k):
			r = ":("
			break

print (r)

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

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

    if abs(a[i]-a[j]) >k:
      print(":(")
      exit()
print("Yay!")

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

k=int(input())

mi = min(a)
ma = max(a)

if ma-mi <= k:
    print("Yay!")
else:
    print(":(")

Solution (Python):
x=[int(input()) for _ in range(5)]
x.reverse()
k=int(input())
for i in range(5):
    for j in range(i+1,5):
        if x[i]-x[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('Yay!')

if e - a > k:
    print(':(')

Solution (Python):
a,*b,e,k = (int(input()) for _ 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())
s=[a,b,c,d,e]
if max(s)-min(s)<=k:
    print("Yay!")
else:
    print(":(")

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

k = int(input())


n = [i - j for i in l for j in l]

if max(n) > 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())
A = [a,b,c,d,e]
ind = 0
for i in range(4):
    for j in range(i+1,5):
        if A[j]-A[i]>k:
            ind = 1
            break
    if ind==1:break
if ind==1:
    print(":(")
else:
    print("Yay!")

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

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
    
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()) for i in range(5)]
k = int(input())
print("Yay!" if a[4] - a[0] <= 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(":(")
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):
a, b, c, d, e, k = [int(input()) for _  in range(6)]

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

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

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

Solution (Python):
n = [int(input()) for i in range(6)]
if max(n[0], n[1], n[2], n[3], n[4]) - min(n[0], n[1], n[2], n[3], n[4]) <= n[5]:
  print("Yay!")  
else:
  print(":(")

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())
 
for i in range(4):
  for j in range(i+1,5):
    if abs(A[i]-A[j]) > K:
      print(':(')
      exit()
print('Yay!')

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

Solution (Python):
a, b, c, d, e, k = [int(input()) for _ in range(6)]
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 (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())
print('Yay!' if max(a,b,c,d,e)-min(a,b,c,d,e) <= k else ':(')

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

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

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

print(':(' if max(l)-min(l)>k else '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):
import numpy as np

N = 5
A = np.array([int(input()) for i in range(N)])
k = int(input())

xx, yy = np.meshgrid(A, A)
comb = np.c_[xx.flatten(), yy.flatten()]

diff_ = np.abs(comb[:, 0] - comb[:, 1])
max_diff = np.max(diff_)

if max_diff <= k:
    print('Yay!')
else:
    print(':(')

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

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

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

Solution (Python):
if __name__ == '__main__':
    X = [int(input()) for _ in range(5)]
    K = int(input())
    flag = True
    for j in range(1, 5):
        for i in range(0, j):
            if max(X[j] - X[i], X[i] - X[j]) > K:
                flag = False
    if flag:
        print('Yay!')
    else:
        print(':(')

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

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):
L=[int(input()) for i in range(5)]
k=int(input())
print('Yay!' if L[4]-L[0] <= k else ':(')

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

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

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

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):
li1 = [int(input()) for i in range(6)]

aim = li1[5]
li1.pop(-1)
maxv = max(li1)
minv = min(li1)
aveg = maxv -minv

if aveg<= aim:
    print("Yay!")    
else:
    print(":(")

Solution (Python):
N=5
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 abs(l[i]-l[j]) > k:
      ans=":("
print(ans)

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):
l = [int(input()) for i in range(6) ]
print(":(" if l[4] - l[0] > l[5] else "Yay!")

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

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

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

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

Solution (Python):
l=[int(input())for _ in range(6)];print(":("if l[4]-l[0]>l[5]else"Yay!")

Solution (Python):
l=[int(input()) for _ in range(6)];print(":(" if l[4]-l[0]>l[5] else "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):
nums = [int(input()) for _ in range(5)]
k = int(input())

if nums[-1] - nums[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-d > k or e-c > k or e-b > k or e-a > k or d-c > k or d-b > k or d-a > k or c-b > k or c-a > k or b-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):
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 _ in range(5)]
k = int(input())

ans = 'Yay!'
for i in range(1, 5):
    if A[i] - A[0] > k:
        ans = ':('
        break

print(ans)

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

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

Solution (Python):
a, k = sorted(list(int(input()) for _ in range(5))),int(input())
print(":(" if a[4] - a[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 e-a > k:
  print(':(')
else:
  print('Yay!')

Solution (Python):
from itertools import combinations
a, b, c, d, e, k = map(int, [input() for _ in range(6)])
for c in combinations([a, b, c, d, e], 2):
  l = list(c)
  if abs(l[0] - l[1]) > k:
    print(":(")
    exit(0)
print("Yay!")

Solution (Python):







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


if max(a) - min(a) > k: res = ':('
else: res = 'Yay!'


print(res)

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

aaaaa=0
list=[a,b,c,d,e]
for i in range(4):
    for j in range(i+1,5):
        if abs(list[i]-list[j])>k:
            aaaaa=1
if aaaaa==1:
    print(":(")
else:
    print('Yay!')

Solution (Python):
import sys
n = [int(input()) for _ in range(6)]

for i in range(4):
    for j in range(i+1, 5):
        if abs(n[i]-n[j]) <= n[len(n)-1]:
            continue
        else:
            print(':(')
            sys.exit()
print('Yay!')

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

Solution (Python):
Ant = [int(input()) for i in range(5)]
k = int(input())
ans = "Yay!"
for i in range(5):
    for j in range(i+1,5):
        if Ant[j]-Ant[i] > k:
            ans =":("
print(ans)

Solution (Python):
a = [None] * 5
for i in range(5):
  a[i] = int(input())
k = int(input())
ans = 'Yay!'

for i in range(4):
  if a[i] + k < max(a):
    ans = ':('
    break
print(ans)

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

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

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

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

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

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

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

Solution (Python):
def main():
    a = int(input())
    b = int(input())
    c = int(input())
    d = int(input())
    e = int(input())
    k = int(input())
    A = [a,b,c,d,e]
    for i in range(len(A)):
        for j in range(i,len(A)):
            if A[j] - A[i] > k:
                print(':(')
                exit()

    print('Yay!')

main()

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

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

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

for i in range(3):
    for j in range(i+1,5):
        if abs(p[i]-p[j])>k:
            flag=False
            print(":(")
            exit(0)

print("Yay!")

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

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

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

Solution (Python):
antenas = []
distance = 0
for i in range(6):
    if i <= 4:
        antenas.append(int(input()))
    else:
        distance = int(input())
cand = []
for i in range(len(antenas)):
    for j in range(i, len(antenas)):
        cand.append(antenas[j] - antenas[i])
flag = True
for i in range(len(cand)):
    if cand[i] > distance:
        print(':(')
        flag = False
        break
if flag:
    print('Yay!')

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

if I[4] - I[0] > I[5] :
	print(":(")
else :
	print("Yay!")

Solution (Python):
list = list(int(input()) for i in range(6))

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

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

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

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

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

if A[4] - A[0] <= A[5]:
    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):
I = [int(input()) for _ in range(6)]

if (I[4] - I[0] > I[5]):
    print (":(")
else:
    print("Yay!")

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

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

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

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

k=int(input())

i=0
while i<4:
  j=i+1
  while j<5:
    if abs(r[i]-r[j])>k:
      print(":(")
      exit()
    
    j+=1
  i+=1
  
print("Yay!")

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):
p = [int(input()) for _ in range(5)]
k = int(input())
ans = "Yay!"

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

print(ans)

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

Solution (Python):


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

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

if __name__ == '__main__':
    print(main())

Solution (Python):
*antennas,k = [int(input()) for _ in range(6)]
print('Yay!' if max(antennas)-min(antennas)<=k else ':(')

Solution (Python):
li=[int(input()) for i in range(5)]
k=int(input())
if li[1]-li[0]>k or li[2]-li[1]>k or li[3]-li[2]>k or li[4]-li[3]>k or li[4]-li[0]>k:
  print(":(")
else:
  print("Yay!")

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

cnt = 0
for i in range(5):
    for j in range(i + 1, 5):
        if abs(ds[i] - ds[j]) > k:
            cnt += 1
if cnt > 0:
    print(':(')
else:
    print("Yay!")

Solution (Python):


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

CanYay = True
ant = [a,b,c,d,e]
for i in range(len(ant)):
    for j in range(i+1, len(ant)):
        if ant[i] == ant[j]:
            continue
        else:
            if abs(ant[i] - ant[j]) > k:
                CanYay = False
            else:
                continue
if CanYay:
    print("Yay!")
else:
    print(":(")

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

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):
inputs=[int(input()) for _ in range(5)]
k=int(input())

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

Solution (Python):
abcde = [0] * 5
for i in range(5):
  abcde[i] = int(input())

k = int(input())
ans = "Yay!"
if abcde[4] - abcde[0] > k:
  ans = ":("
print(ans)

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

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

Solution (Python):
x = [int(input()) for i in range(6)]
hantei = False
for i in range(5):
    for j_ in range(1,5-i):
        j = i + j_
        if x[j]-x[i] > x[5] : 
            hantei = True
if hantei :
    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):
ae_list = [int(input()) for i in range(5)]
k = int(input())

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

print('Yay!')

Solution (Python):
A=[int(input()) for _ in range(5)]
k=int(input())
f=True
for i in range(4):
	for j in range(i,5):
		if abs(A[i]-A[j])>k:
			f=False

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

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