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


Plot = []

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

max_distance = int(input())

for i in range(9):
    if(i < 4):
        if(abs(Plot[0] - Plot[i+1]) > max_distance):
            print(":(")
            break
    elif(4 <= i <= 6):
        if (abs(Plot[1] - Plot[i-2]) > max_distance):
            print(":(")
            break
    elif(6 < i < 8):
        if (abs(Plot[2] - Plot[i - 5]) > max_distance):
            print(":(")
            break
    elif(i == 8):
        if(abs(Plot[3] - Plot[4]) > max_distance):
            print(":(")
        else:
            print("Yay!")

Solution (Python):
import sys

d = [int(i) for i in sys.stdin.read().split('\n') if i != '']
k = d[5]
d = d[:5][::-1]


def check(k, d):
    for i in range(len(d[:4])):
        for j in range(i, len(d)):
            if d[i] - d[j] > k:
                return False
    return True


if check(k, d):
    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 e - a <= k:
    print("Yay!")
else:
    print(":(")

Solution (Python):
a,b,c,d,e,k = int(input()),int(input()),int(input()),int(input()),int(input()),int(input())
antennas = [a,b,c,d,e]
def a(antennas, k):
  if k == 0:
    print("Yay!")
    return
  for i in range(4):
    for j in range(i,5):
      if abs(antennas[i]-antennas[j]) > k:
        print(":(")
        return
  print("Yay!")
  return
a(antennas, k)

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

k=int(input())

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

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

k=int(input())

an = sorted(an)

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

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

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

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

dis = max(abs(b-a),abs(c-a),abs(d-a),abs(e-a),abs(c-b),abs(d-b),abs(e-b),abs(d-c),abs(e-c),abs(e-d))
if dis <= k :
    print('Yay!')
else:
    print(':(')

Solution (Python):
import itertools
a = []
for _ in range(5):
  a.append(int(input()))
k = int(input())
a = a[::-1]
combs = itertools.combinations(a, 2)
for (n, m) in combs:
    if n - m > 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):


a = []

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

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

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

flag_disconnectable = False
for i in range(5):
    for j in range(5):
        if i == j: continue
        if (lis[j]-lis[i]) > k:
            flag_disconnectable = True
            break

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

Solution (Python):
import itertools
a = []
for _ in range(5):
  a.append(int(input()))
k = int(input())
combs = itertools.combinations(a, 2)
l = [(n,m) for (n, m) in combs if m - n > k]
if len(l) == 0:
  print('Yay!')
else:
  print(':(')

Solution (Python):
if __name__ == '__main__':
    a = int(input())
    b = int(input())
    c = int(input())
    d = int(input())
    e = int(input())
    k = int(input())
    
    a1 = b-a
    a2 = c-a
    a3 = d-a
    a4 = e-a
    b1 = c-b
    b2 = d-b
    b3 = e-b
    c1 = d-c
    c2 = e-c
    d1 = e-d
    
    if (a1 <= k and a2 <= k and a3 <= k and a4 <= k and b1 <= k and b2 <= k and b3 <= k and c1 <= k and c2 <= k and d1 <= k):
        print("Yay!")
    else:
        print(":(")

Solution (Python):
import sys

e = [int(sys.stdin.readline().rstrip()) for _ in range(6)]
if e[-2] - e[0] > e[-1]:
    print(":(")
else:
    print("Yay!")

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

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

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

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)

l=e-a

if l<=k:
    print("Yay!")
else:
    print(":(")

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

Solution (Python):
import itertools

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

ok = True
for i, j in itertools.product(a, a):
    if (j - i) < 0:
        continue
    if k >= (j - i):
        pass
    else:
        ok = False
        break

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

Solution (Python):
import sys

d = [int(i) for i in sys.stdin.read().split('\n') if i != '']
k = d[5]
d = d[:5][::-1]


def check(k, d):
    for i in range(len(d[:4])):
        for j in range(i, len(d)):
            if d[i] - d[j] > k:
                return False
    return True


if check(k, d):
    print('Yay!')
else:
    print(':(')

Solution (Python):
dists = [int(raw_input()) for i in range(6)]
print "Yay!" if dists[4] - dists[0] <= dists[5] 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):
ar = []
for i in range(5):
    l = int(input())
    ar.append(l)
r = int(input())
for i in range(1,5):
    if ar[i] - ar[0] > r:
        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):
a, b, c, d, e, k = [int(input()) for _ in range(6)]
print('Yay!'*((e-a)<=k) or ':(')

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

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

a_e = e-a

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

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())
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 = []
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):
from sys import stdin

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

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

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

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

ans = max(a) -min(a)
if ans <= 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())

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

for i in range(5):
 f=R[i]-R[0]
 g=R[i]-R[1]
 h=R[i]-R[2]
 j=R[i]-R[3]
 if f>k or g>k or h>k or j>k:
  print(":(")
  exit()
print("Yay!")

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

if max(data[:-1]) - min(data[:-1]) <= data[-1]:
    print('Yay!')
else:
    print(':(')

Solution (Python):
t = "Yay!"
f = ":("

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

if max(antennas) <= k:
    print(t)
else:
    flag = True
    for i in antennas:
        for j in antennas:
            if abs(i - j) >= k:
                flag = False
    if flag:
        print(t)
    else:
        print(f)

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, b, c, d, e, k = [int(input()) for i in range(6)]

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

Solution (Python):
l = list(int(input()) for i in range(5))
k = int(input())

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

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

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

Solution (Python):


a=int(input())
m=n=a
ans="Yay!"
for i in range(4):
    t=int(input())
    if(m<t):
        m=t
    elif(n<t):
        n=t
k=int(input())
if(m-n>k):
    ans=":("
print(ans)

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

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

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

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

Solution (Python):

n = [int(input()) for i in range(6)]
k = n[5]
ret = "Yay!"
for i in range(5):
    x = n[i]
    for j in range(1,5-i):
        y = n[i+j]
        if(y-x>k):
            ret = ":("
            break
    else:
        continue
    break

print(ret)

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

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

for i in range(5):
  for j in range(5):
    ans = abs(a[i] - a[j])
    b.append(ans)

c = 0
for i in b:
  if i > k:
    c += 1

if c == 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())

list=[]
list.append(a)
list.append(b)
list.append(c)
list.append(d)
list.append(e)

yes="Yay!"
no=":("
flag=False

for i in range(5):
    for j in range(5):
        if i==j or i>j:
            continue
        if k<list[j]-list[i]:
            flag=True
if flag:
    print(no)
else:
    print(yes)

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

maxima = values[4] - values[0]

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

ret = ':('
if inputList[4] - inputList[0] <= k:
    ret = 'Yay!'

print(ret)

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

k = int(input())

ret = 'Yay!'
for i in range(4):
    for j in range(i+1, 5):
        if inputList[j] - inputList[i] > k:
            ret = ':('
            break
print(ret)

Solution (Python):
li=[]
for i in range(0,5):
  a=int(input())
  li.append(a)
base=int(input())
if max(li)-min(li)<=base:
  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):
a,b,c,d,e,k = [int(input()) for _ in range(6)]

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

Solution (Python):
num = [int(input()) for i in range(5)]
k = int(input())
leg = num[4]-num[0]

if (leg<=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())
MIN = min([a,b,c,d,e])
MAX = max([a,b,c,d,e])
if MAX - MIN <= k:
  print('Yay!')
else:
  print(':(')

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

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

Solution (Python):
A = [int(input()) for i in range(5)]
k = int(input())
A.sort()
print("Yay!" if abs(A[0]-A[-1]) <= k else ":(")

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

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

Solution (Python):
dic = {}
for antenna in ["A", "B", "C", "D", "E"]:
    dic[antenna] = int(input())
distant = int(input())

flg = False
for i in dic.keys():
    for j in dic.keys():
        if abs(dic[j] - dic[i]) > distant:
            flg = True
            break

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

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

Solution (Python):
sm = float('inf')
bi = - float('inf')
for _ in range(5):
    v = int(input())
    if v < sm: sm = v
    if v > bi: bi = v

if bi - sm > int(input()): print(':(')
else: print('Yay!')

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

flag = "Yay!"
if li[4] - li[0] > li[5]:
    flag = ":("

print(flag)

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

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

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

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

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

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


if __name__ == '__main__':
    main()

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


k = int(input())

def diff(x, y, z = k):
  if abs(x - y) > z:
    return 1
  else:
    return 0
  
num = 0

num += diff(a, e)
num += diff(a, d)
num += diff(a, c)
num += diff(a, b) 
num += diff(b, e)
num += diff(b, d)
num += diff(b, c)
num += diff(c, e)
num += diff(c, d)
num += diff(d, e)

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

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

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

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

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

k = int(input())
l.sort()
if l[-1] - l[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 (e - a) > k:
    print(":(")
else:
    print("Yay!")

Solution (Python):
from itertools import combinations

li_ant = list()

for _ in range(5):
    li_ant.append(int(input()))

k = int(input())

if all([abs(cmb[0] - cmb[1]) <= k for cmb in combinations(li_ant, 2)]):
    print("Yay!")
else:
    print(":(")

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

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

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

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())

if A[4] - 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('Yay!')
else: print(':(')

Solution (Python):
a,*_,e,k=map(int,open(0));print('Y:a(y !'[e-a>k::2])

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

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

Solution (Python):
import sys
input_list = []
for line in sys.stdin:
    input_list.append(int(line))
k = input_list.pop(-1)

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

Solution (Python):

list1 = []

for n in range(6):

    list1.append(int(input()))

count = 0

for city1 in list1[:5]:
    for city2 in list1[:5]:
        if (city1 - city2 > list1[5] or city2 - city1 > list1[5]):
            print ':('
            count += 1
            break
    if count != 0:
        break
if count == 0:
    print 'Yay!'

Solution (Python):
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
f=[a,b,c,d,e]
ma=max(f)
mi=min(f)
if ma-mi>k:
  print(":(")
else:
  print("Yay!")

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

if l[4] - l[0] > 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(":(")
else:
    print("Yay!")

Solution (Python):
arr=[]
for i in range(6):
    arr.append(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())
ant=[a,b,c,d,e]
f=False

for i in range(0,5):
    for ii in range(i+1,5):
        sa=ant[i]-ant[ii]
        if -sa<=k:
            continue
        else:
            print(":(")
            f=True
            break
    break

if f is False:
    print("Yay!")

Solution (Python):
import sys

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

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

def isDisConnected(i, j):
    if abs(i - j) > k:
        return True
    return False

idx1 = 0
while(True):
    idx2 = idx1 + 1
    if idx1 == 5:
        break
    while(idx2 < 5):
        if isDisConnected(antennas[idx1], antennas[idx2]):
            print(":(")
            sys.exit()
        idx2 += 1
    idx1 += 1

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 = 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 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())
ant = [a, b, c, d, e]
f = False

for i in range(0, 5):
    for ii in range(i + 1, 5):
        sa = ant[i] - ant[ii]
        if -sa <= k:
            continue
        else:
            print(":(")
            f = True
            break
    break

if f is False:
    print("Yay!")

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

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

Solution (Python):
import sys,heapq
from collections import deque,defaultdict
printn = lambda x: sys.stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True 
def ddprint(x):
  if DBG:
    print(x)

a = inn()
b = inn()
c = inn()
d = inn()
e = inn()
k = inn()
print(':(' if e-a > k else '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):
x = []
flag = 0
for i in range(6):
    x.append(int(input()))

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

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

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 i in range(6)]
print('Yay!' if a[4]-a[0]<=a[5] else ':(')

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





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

Solution (Python):
lst = []
for i in range(0, 5):
	lst.append(int(raw_input()))
k = int(raw_input())
ans = 'Yay!'
for i in range(0, 5):
	for j in range(i+1, 5):
		if lst[j]-lst[i] > k:
			ans = ':('
print ans

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

K = int(input())

Yay_juge = 1
for j in range(5) :
    for m in range(5) :
        Antennas_juge = abs(Antennas_int[j] - Antennas_int[m])
        if Antennas_juge > K:
            Yay_juge = 0
            break

if Yay_juge == 1 :
    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=[]
for i in range(6):
  a.append(int(input()))
if a[4]-a[0]>a[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):
import sys

mx = 0

mn = 124
mx = 0
for i in range(5):
    tmp = int(sys.stdin.readline())
    mn = min(mn, tmp)
    mx = max(mx, tmp)

if (mx-mn) > int(sys.stdin.readline()):
    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(b-a,c-a,d-a,e-a,c-b,d-b,e-b,d-c,e-c,e-d,) <= k:
    print('Yay!')
else:
    print(':(')

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

Solution (Python):



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

Solution (Python):



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

Solution (Python):
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions
import itertools
import copy
import collections
from operator import itemgetter

def j(q):
    if q==1: print("Yay!")
    else:print(":(")
    exit(0)


def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")

def ip():
    return int(input())
def printrow(a):
    for i in range(len(a)):
        print(a[i])






a=[ip() for i in range(5)]    



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

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

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

if List[4] - List[0] > List[5] :
    print(":(")
    sys.exit()

print("Yay!")

Solution (Python):
n = []
for i in range(5):
    n.append(int(input()))
k = int(input())
if max(n) - min(n) <= 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=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
lst = []
for i in range(6):
    lst.append(int(input()))
k = lst.pop(-1)
comb = list(itertools.combinations(lst, 2))
c = 0
ans = 'Yay!'
for l in range(len(comb)):
    a = comb[l][0]
    b = comb[l][1]
    if a < b:
        if b - a > k:
            c += 1
    else:
        if a - b > k:
            c += 1
if c != 0:
    ans = ':('
print(ans)

Solution (Python):
list_a2e = [int(input()) for _ in range(5)]
k = int(input())
dist = list_a2e[4] - list_a2e[0]

ans = ":("
if dist <= k:
    ans = "Yay!"

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

Solution (Python):



def main():
    alpha = [int(input()) for _ in range(5)]
    k = int(input())

    for a in alpha:
        for b in alpha:
            if abs(a - b) > k:
                print(':(')
                exit()

    print('Yay!')


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):



def main():
    alpha = [int(input()) for _ in range(5)]
    k = int(input())

    for a in alpha:
        for b in alpha:
            if abs(a - b) > k:
                print(':(')
                exit()

    print('Yay!')


if __name__ == '__main__':
    main()

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

Solution (Python):
a = int(input())
input()
input()
input()
e = int(input())
k = int(input())

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

Solution (Python):


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

frag = True
for i in range(5):
    for j in range(5):
        if abs(antena[i] - antena[j]) > k:
            frag = False
print('Yay!' if frag 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):
import sys, os


if 'local' in os.environ :
    sys.stdin = open("./input.txt", "r")

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

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

Solution (Python):

import sys


def solve(a: int, b: int, c: int, d: int, e: int, k: int):
    if e - a <= k:
        print("Yay!")
    else:
        print(":(")
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  
    b = int(next(tokens))  
    c = int(next(tokens))  
    d = int(next(tokens))  
    e = int(next(tokens))  
    k = int(next(tokens))  
    solve(a, b, c, d, e, k)

if __name__ == '__main__':
    main()

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

lenge = 0

for i in range(5):
  for j in range(5):
    if A[i] - A[j] > K:
      lenge += 1
      
if lenge > 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((b-a > k) or (c-b > k) or (d-c > k) or (e-d > k) or (c-a > k) or (d-a > k) or (e-a > k) or (d-b > k) or (e-b > k) or (e-c > k)):
    print(":(")
else:
    print("Yay!")