Problem:
 ﻿Score: 100 points    Problem Statement  In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e , respectively. Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k . Determine if there exists a pair of antennas that cannot communicate directly . Here, assume that the distance between two antennas at coordinates p and q ( p < q ) is q - p .      Constraints   a, b, c, d, e and k are integers between 0 and 123 (inclusive).  a < b < c < d < e         Input  Input is given from Standard Input in the following format:  a  b  c  d  e  k       Output  Print :( if there exists a pair of antennas that cannot communicate directly , and print Yay! if there is no such pair.        Sample Input 1 1
2
4
8
9
15      Sample Output 1 Yay!  In this case, there is no pair of antennas that cannot communicate directly, because:   the distance between A and B is 2 - 1 = 1  the distance between A and C is 4 - 1 = 3  the distance between A and D is 8 - 1 = 7  the distance between A and E is 9 - 1 = 8  the distance between B and C is 4 - 2 = 2  the distance between B and D is 8 - 2 = 6  the distance between B and E is 9 - 2 = 7  the distance between C and D is 8 - 4 = 4  the distance between C and E is 9 - 4 = 5  the distance between D and E is 9 - 8 = 1   and none of them is greater than 15 . Thus, the correct output is Yay! .       Sample Input 2 15
18
26
35
36
18      Sample Output 2 :(  In this case, the distance between antennas A and D is 35 - 15 = 20 and exceeds 18 , so they cannot communicate directly.
Thus, the correct output is :( .

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

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

Solution (Python):
ant = [int(input()) for i in range(5)]
K = int(input())
for j in range(4):
  for k in range(4):
    if ant[4-j] - ant[3-k] > K:
      print(':(')
      exit()
print('Yay!')

Solution (Python):
a = list(int(input()) for i 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(5)]
k = int(input())

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

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

distance = []
for c in contena:
	for j in contena:
		distance.append(abs(c-j))
if max(distance) > thre:
	print(':(')
else:
	print('Yay!')

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

Solution (Python):
ak =[]
counter = 0
for i in range(6):
    ak.append(int(input()))
for i in range(4):
    if ak[i+1]-ak[0]>ak[5]:
        counter+=1
if counter >=1:
    print(":(")
else:
    print("Yay!")

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

import copy

def main(): 

    a=[int(input()) for _ in range(6)]
    Flag = True
    for i in range(5):
        for j in range(5):
            if abs(a[i]-a[j]) > a[5]:
                Flag = False
                break
        if not(Flag):
            break
    if Flag:
        print("Yay!")
    else:
        print(":(")
    



if __name__ == "__main__":
    main()

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

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

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

k = int(input())
f = False
for a in l:
    for b in l:
        if a != b:
            if b - a > k:
                f = True

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

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

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

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

Solution (Python):
from itertools import combinations

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

answer = "Yay!"
for x, y in combinations(antenna, 2):
    if abs(x - y) > k:
        answer = ":("
        break
print(answer)

Solution (Python):
Li = list(int(input()) for _ in range(6))
F =[1  for i in range(4) for j in range(i+1,5) if abs(Li[j]-Li[i]) <= Li[5]]
print ("Yay!" if len(F)==10 else ":(")

Solution (Python):
def distance():
    N = [input() for i in range(5)]
    N = list(map(int, N))
    dis = int(input())
    for i in range(5):
        for j in range(i + 1, 5):
            if N[j] - N[i] > dis:
                print(":(")
                return
    print("Yay!")


distance()

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

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

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

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

Solution (Python):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if 0 <= a <= 123 and 0 <= b <= 123 and 0 <= c <= 123 and 0 <= d <= 123 and 0 <= e <= 123 and 0 <= k <= 123 and a < b < c < d < e:
    if k >= e - a:
        print('Yay!')
    else:
        print(':(')
else:
    print('invalid value')

Solution (Python):
def main():
    p = []
    for _ in range(5):
        p.append(int(input()))
    k = int(input())
    if p[4] - p[0] > k:
        return ":("
    else:
        return "Yay!"

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

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

Solution (Python):
import sys
s = [int(input()) for i in range(5)]
s.sort()
n = len(s)
k = int(input())
for i in range(n):
  for j in range(i+1,n):
    if s[j]-s[i] > k:
      print(":(")
      sys.exit()
print("Yay!")

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

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

Solution (Python):
myArray = list()
for n in range(5):
   myArray.append(int(input()))
k = int(input())
myflag = True

for i in range(len(myArray)-1):
    for j in range(i+1,len(myArray)):
        if myArray[j] - myArray[i] > k:
            myflag = False

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

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

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

d = True
for i in range(5):
  if d:
    for j in range(i,5):
      if antenna[j]-antenna[i] > K:
        print(':(')
        d = False
        break
if d:
  print('Yay!')

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

Solution (Python):
*ant, k = (int(input()) for _ in range(6))
flag = True
for i in range(5):
    for j in range(i+1,5):
        if ant[j] - ant[i] > k:
            print(":(")
            flag = False
            break
    if not(flag):
        break
else:
    print("Yay!")

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

Solution (Python):
import itertools
A = [int(input()) for _ in range(5)]
k = int(input())
print([":(", "Yay!"][all([b-a <= k for a, b in itertools.combinations(A, 2)])])

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

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

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

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

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

print('Yay!' 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 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
import math
from collections import defaultdict


sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]


mod = 10**9 + 7


def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N):
    read_all = [tuple(map(int, input().split())) for _ in range(N)]
    return map(list,zip(*read_all))



x = [0]*5
for i in range(5):
    x[i] = I()
k = I()

ans = 'Yay!'
for i in range(5):
    for j in range(i+1,5):
        if abs(x[i]-x[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())

seq = [a, b, c, d, e]
ans = "Yay!"

for i in range(5):
	for j in range(i, 5):
		buf = seq[i] - seq[j]
		if abs(buf) > k:
			ans = ":("
			
print(ans)

Solution (Python):

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

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

Solution (Python):
a = [int(input()) for _ in range(6)]
b = 0
m = 'Yay!'

if abs(a[0]-a[1]) > a[5]:
    m = ':('
elif abs(a[0]-a[2]) > a[5]:
    m = ':('
elif abs(a[0]-a[3]) > a[5]:
    m = ':('
elif abs(a[0]-a[4]) > a[5]:
    m = ':('
elif abs(a[1]-a[2]) > a[5]:
    m = ':('
elif abs(a[1]-a[3]) > a[5]:
    m = ':('
elif abs(a[1]-a[4]) > a[5]:
    m = ':('
elif abs(a[2]-a[3]) > a[5]:
    m = ':('
elif abs(a[2]-a[4]) > a[5]:
    m = ':('
elif abs(a[3]-a[4]) > a[5]:
    m = ':('

print(m)

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

Solution (Python):
import sys
input = sys.stdin.readline
abcde = [int(input()) for _ in range(5)]
k = int(input())

for x in abcde:
  for y in abcde:
    if abs(x - y) > k:
      print(':(')
      exit(0)

print('Yay!')

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

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

for i in range(4):
  for j in range(i+1,5):
    if L[j]-L[i]>k:
      print(':(')
      sys.exit()
  
    if i==2 and j==3:
      print('Yay!')

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

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

k = int(input())

for i in range(len(antennas)):
    for j in range(i + 1,len(antennas)):
        if antennas[j] - antennas[i] > k:
            print(":(")
            exit(0)

print('Yay!')

Solution (Python):
import sys
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
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())

x=sorted([a,b,c,d,e])
if x[4]-x[0]>k:
  print(':(')
  sys.exit()
print('Yay!')

Solution (Python):
import sys
list_ = []
for i in range(5):
    list_.append(int(input()))
k =int(input())
for i in range(5):
    for j in range(5):
        diff = list_[i]-list_[j]
        if abs(diff) > k :
            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-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):
x=[]
for i in range(5):
    x.append(int(input()))
k=int(input())
s="Yay!"
for i in range(5):
    for j in range(5-i-1):
        if abs(x[i+j+1]-x[i])>k:
            s=":("
            break
    if s==":(":
        break
print(s)

Solution (Python):
import math

inputList=[]
for i in range(6):
    inputNum = input()
    inputList.append(inputNum)

























flg = 1

if int(inputList[4])-int(inputList[0]) > int(inputList[5]):
    flg = 0

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

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


if __name__ == "__main__":
    print(solve())

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

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

for i in a:
    for j in a:
        if i == j:
            continue
        if j - i > k:
            print(":(")
            exit()
print("Yay!")

Solution (Python):
def test():
    a = []
    count = 0

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

    b = max(a)
    b -= min(a)

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


if __name__ == "__main__":
    test()

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

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

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

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

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

Solution (Python):
import numpy as np

A = np.array([])

A = np.append(A, int(input()))
A = np.append(A, int(input()))
A = np.append(A, int(input()))
A = np.append(A, int(input()))
A = np.append(A, int(input()))
k = int(input())

if (np.max(A)-np.min(A)) > k:
    print(":(")
else:
    print("Yay!")

Solution (Python):
def inputNum():
    numList = []
    for i in range(5):
        numList.append(int(input()))
    return numList


def kJudge(k):
    for i in range(0, 4):
        for j in range(i, 5):
            if abs(numList[i] - numList[j]) > k:
                return ":("
    return "Yay!"


numList = inputNum()
k = int(input())
print(kJudge(k))

Solution (Python):
import sys

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

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

for x1 in X:
    for x2 in X:
        if abs(x1-x2) > k:
            print(":(")
            sys.exit()
print("Yay!")

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

ANS=[0]*10

ANS[0]=b-a
ANS[1]=c-a
ANS[2]=d-a
ANS[3]=e-a
ANS[4]=c-b
ANS[5]=d-b
ANS[6]=e-b
ANS[7]=d-c
ANS[8]=e-c
ANS[9]=e-d

flag=0

for i in range(0,10):
    if ANS[i]>k:
        flag+=1
        
if flag==0:
    print('Yay!')
else :
    print(':(')

Solution (Python):
a,*_,e,k=map(int,open(0).read().split())
print(':(' if k < (e-a) else 'Yay!')

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

Solution (Python):
antennas = list(int(input()) for _ in range(5))
k = int(input())

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

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

Solution (Python):
s = list(map(int,(input(), input(), input(), input(), input())))
k = int(input())
print(":(" if s[4]-s[0] > k else "Yay!")

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

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

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

Solution (Python):
lst = list()
for i in range(0, 6):
    a = int(input())
    lst.append(a)

cnt = 0

for i in range(1,len(lst)-1):
    diff = abs(lst[0] - lst[i])
    if diff > lst[-1]:
        cnt += 1
        print(':(')
        break

if cnt > 0:
    pass
else:
    for i in range(2, len(lst)-1):
        diff = abs(lst[1] - lst[i])
        if diff > lst[-1]:
            cnt += 1
            print(':(')
            break

if cnt > 0:
    pass
else:
    for i in range(3, len(lst)-1):
        diff = abs(lst[1] - lst[i])
        if diff > lst[-1]:
            cnt += 1
            print(':(')
            break

if cnt > 0:
    pass
else:
    for i in range(4, len(lst)-1):
        diff = abs(lst[1] - lst[i])
        if diff > lst[-1]:
            cnt += 1
            print(':(')
            break

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

Solution (Python):
l = []
for i in range(6):
    if i <= 4:
        l.append(int(input()))
    else:
        k = int(input())

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

Solution (Python):
A = []
for i in range(5):
  A.append(int(input()))
k = int(input())
ans = True
for i in range(4):
  for j in range(i, 5):
    if abs(A[i] - A[j]) > k:
      ans = False
      break
if ans:
  print("Yay!")
else:
  print(":(")

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

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

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

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

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

m='Yay!'
for i in range(5):
  for j in range(5):
    if abs(l[i]-l[j])>N:
      m=':('
    
print(m)

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

L = []
cnt = 0

ab = abs(a-b)
ac = abs(a-c)
ad = abs(a-d)
ae = abs(a-e)
bc = abs(b-c)
bd = abs(b-d)
be = abs(b-e)
cd = abs(c-d)
ce = abs(c-e)
de = abs(d-e)

L.append(ab)
L.append(ac)
L.append(ad)
L.append(ae)
L.append(bc)
L.append(bd)
L.append(be)
L.append(cd)
L.append(ce)
L.append(de)

for l in L:
    if l > k:
        print(':(')
        break
    else:
        cnt += 1
        if cnt == 5:
            print('Yay!')

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

Solution (Python):
al = [int(input()) for _ in range(5)]
print("Yay!" if abs(al[0] - al[len(al)-1]) <= int(input()) else ":(")

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

k = int(input())

ans = "Yay!"
for i in range(len(A)):
    for j in range(i+1, len(A)):
        p, q = A[i], A[j]
        d = q - p
        if d > k:
            ans = ":("

print(ans)

Solution (Python):
kyori = []
for i in range(5):
    kyori += [int(input())]
a = kyori[0]
e = kyori[-1]
k = int(input())

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

Solution (Python):

kyori = []
for i in range(5):
    kyori += [int(input())]
k = int(input())

for i in range(1, len(kyori)+1):
    left = kyori[:i]
    right = kyori[i:]
    base = left[-1]

    for r in right:
        if abs(base - r) > 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=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):
data = [int(input()) for _ in range(5)]
m = int(input())
if m >= (data[4] - data[0]):
  print('Yay!')
else:
  print(':(')

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

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

for n in range(5):
    for m in range(5):
        if n != m:
            if abs(A[n]-A[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("Yay!")
else:
  print(":(")

Solution (Python):
import numpy as np

coor  = []
for _ in range(5):
	coor.append(int(input()))

k = int(input())

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

Solution (Python):
import sys

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

for j in range(5):
  if int(N[j]) - int(N[0]) > int(N[5]):
    print(":(")
    sys.exit()
print("Yay!")

Solution (Python):










import numpy as np
import math
import copy

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

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

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

if ant[-2] - ant[0] > ant[-1]:
    print(":(")
else:
    print("Yay!")

Solution (Python):
a=list(map(int,open(0)));print(["Yay!",":("][max(a[:5])-min(a[:5])>a[5]])

Solution (Python):
a, b, c, d, e, k = map(int, open(0))
print(["Yay!", ":("][max(a, b, c, d, e) - min (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())










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

Solution (Python):



import itertools

place_list = []

for _ in range(5):
    place_list.append(int(input().split()[0]))

k = int(input().split()[0])

p = itertools.combinations(place_list, 2)

is_ok = True

for p_1, p_2 in p:
    if abs(p_1 - p_2) > k:
        is_ok = False

ans = 'Yay!' if is_ok else ':('

print(ans)

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

if b-a > k 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!')

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

li = [int(input()) for x in range(6)]

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

Solution (Python):

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

Solution (Python):
def five_antennas(a,n):
    kyori = a[n-1]
    for i in range(n-1):
        for j in range(n-1):
            if i != j:
                distance = abs(a[i] - a[j])
                if kyori < distance:
                    return ":("
    return "Yay!"

if __name__ == '__main__':
    a = []
    for i in range(6):
        a.append(int(raw_input()))

    print five_antennas(a,6)

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

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

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

Solution (Python):
grid = [0] * 6

result = 'Yay!'

for i in range(len(grid)):
  grid[i] = int( input() )

  
for i in range(len(grid)-2):
  for j in range(i+1,len(grid)-1):
    
    if grid[j] - grid[i] > grid[len(grid)-1]:
      result = ':('
      break

print( result )

Solution (Python):

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

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

Solution (Python):
import sys
from fractions import gcd

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

k = int(input())

for i in range(5):
    for j in range(5):
        if abs(a[i] - a[j]) > k:
            print(":(")
            exit(0)

print("Yay!")

Solution (Python):
antenna = [int(input()) for i in range(5)]
k = int(input())
judge = ''
i,j = 1,1
for i in range(5):
  for j in range(i+1,5):
    if abs(antenna[i]-antenna[j]) > k:
      judge = ':('
      break

if judge==':(':
  print(':(')
else:
  print('Yay!')

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

if max(a) - min(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 or d - a > 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 = []

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

k = int(input())

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

Solution (Python):
startD = int(input())
for i in range(3):
  input()
endD = int(input())

if endD-startD > int(input()):
  print(":(")
else:
  print("Yay!")

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

res='Yay!'

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

print(res)

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):
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 numpy as np

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

flag=True
for i in range(5):
  temp_posi_list = posi_list.copy()
  posi = temp_posi_list[i]
  del temp_posi_list[i]
  temp_posi_list = np.array(temp_posi_list)
  max_dist = max(np.abs(temp_posi_list - posi))
  if max_dist > k:
    flag=False
    break
if flag:
  print("Yay!")
else:
  print(":(")

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

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

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

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

Solution (Python):
antennas = []
for i in range(5):
    antennas.append(int(input()))
k = int(input())
ans = "Yay!"
for i in range(4):
    for j in range(i+1,5):
        if antennas[j] - antennas[i] > 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(":(")
else:
    print("Yay!")

Solution (Python):
A = [input() for i in range(6)]
X = list(map(int, A))
a = X[0]
e = X[4]
k = X[5]
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):
import sys

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

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

"""
0 1234
1 234
2 34
3 4
"""

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

k = int(input())

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