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

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

Solution (Python):
ans=0
a=[0]*5
for x in range(5):
  a[x]=int(input())
k=int(input())
for y in range(5):
  for z in range(5):
    if y!=z:
      if abs(a[y]-a[z])>k:
        ans+=1
if ans==0:
  print("Yay!")
else:
  print(":(")

Solution (Python):
from itertools import combinations

A = [int(input()) for _ in range(5)]
k = int(input())
for a in combinations(A, 2):
    p, q = a
    if abs(p - q) > k:
        print(":(")
        exit()
print("Yay!")

Solution (Python):













































































global FLAG_LOG
FLAG_LOG = False


def log(value):
    
    
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    
    
    
    
    
    values = list()
    for i in range(5):
        values.append(int(lines[i]))
    
    
    

    log(f'lines[5]=[{lines[5]}]')

    for i in range(5):
        for j in range(5):
            log(f'values[i]=[{values[i]}], values[j]=[{values[j]}], lines[5]=[{lines[5]}]')
            log(f'abs(values[i] - values[j])=[{abs(values[i] - values[j])}], int(lines[5])=[{int(lines[5])}]')
            if abs(values[i] - values[j]) > int(lines[5]):
                return [':(']
    return ['Yay!']



def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['1', '2', '4', '8', '9', '15']
        lines_export = ['Yay!']
    if pattern == 2:
        lines_input = ['15', '18', '26', '35', '36', '18']
        lines_export = [':(']
    if pattern == -1:
        lines_input = ['18', '19', '26', '35', '36', '18']
        lines_export = ['Yay!']
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode



def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(6)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    if FLAG_LOG:
        log(f'lines_input=[{lines_input}]')
        log(f'lines_export=[{lines_export}]')
        log(f'lines_result=[{lines_result}]')
        if lines_result == lines_export:
            log('OK')
        else:
            log('NG')
    finished = time.time()
    duration = finished - started
    log(f'duration=[{duration}]')



if __name__ == '__main__':
    main()

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

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

Solution (Python):

import sys
def I(): return int(sys.stdin.readline().rstrip())

A = [I() 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())
import itertools

cannot=False
for x,y in itertools.combinations([a,b,c,d,e],2):
    if y-x>k:
        cannot=True
if cannot:
    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())
print('Yay!' if l[-1] - l[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('Yay!')

else:
    print(':(')

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

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

for i in a[1:-1]:
    if i-a[0] > a[-1]:
        print(':(')
        sys.exit()
print('Yay!')

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

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

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

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

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

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

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

flag = 1
for i in range(len(x)-1):
  for j in range(len(x)):
    if x[j]-x[i] > k:
      flag = 0
      break
  if flag == 0:
    break
if flag == 0:
  print(':(')
else:
  print('Yay!')

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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

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

if __name__ == '__main__':
    main()

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

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

for v in itertools.combinations([a, b, c, d, e], 2):
    if v[1]-v[0] > k:
        print(':(')
        exit()
print('Yay!')

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

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

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

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

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

Solution (Python):
import sys
array = [0,0,0,0,0,0]
for I in range(len(array)):
    array[I] = int(input())
    if not ( 0 <= array[I] <= 123 ):
        sys.exit()
print('Yay!') if (array[4] - array[0]) <= array[-1] else print(':(')

Solution (Python):
def main():
 a = int(input())
 b = int(input())
 c = int(input())
 d = int(input())
 e = int(input())
 lim = int(input())
 if max(a,b,c,d,e) - min(a,b,c,d,e) <= lim:
     print('Yay!')
 else:
     print(':(')
main()

Solution (Python):
A=[0]*6
for i in range(6):
  A[i]=int(input())
  
isOK=True
for i in range(5):
  for j in range(i,5):
    if(abs(A[i]-A[j]) > A[5]):
      isOK=False
      
if(isOK):
  print("Yay!")
else:
  print(":(")

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

def main():
    antennas = [int(input()) for _ in range(5)]
    k = int(input())
    for i in range(4):
        for j in range(i+1, 5):
            if antennas[j] - antennas[i] > k:
                print(":(")
                return
    print("Yay!")
        
if __name__ == '__main__':
    main()

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

Solution (Python):
a,b,c,d,e,k=[int(input()) for i 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):
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline

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

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

ans = False
for i in range(5):
    for j in range(i + 1, 5):
        if li[j] - li[i] > k:
            ans = True
            break


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

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

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

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

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

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

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

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

n=int(input())

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

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

Solution (Python):
import bisect
import copy
import heapq
import math
import sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
sys.setrecursionlimit(500000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

abc=[list(map(int,input().split())) for i in range(6)]
if abc[4][0]-abc[0][0]>abc[5][0]:
    print(":(")
else:
    print("Yay!")

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

Solution (Python):
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for _ in range(N)]
def dp2(ini, i, j): return [[ini]*i for _ in range(j)]





A = sorted([ii() for _ in range(5)])

K = ii()

if A[-1] - A[0] > K:
    print(':(')
else:
    print('Yay!')

Solution (Python):
V = []
for i in range(5):
  V.append(int(input()))
               
k = int(input())
               
d = max(V) - min(V)

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

Solution (Python):
Dist = [int(input()) for X in range(0,5)]
if Dist[4]-Dist[0]<= int(input()): 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):
import sys
sys.setrecursionlimit(10**6)

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

for i in a2e:
    for j in a2e:
        if abs(i-j) > k:
            print(':(')
            break
    else:
        continue
    break
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 abs(a - e) > k:
    print(":(")
else:
    print("Yay!")

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

ans = "Yay!"
for i in range(5):
    for j in range(5):
        if A[i] - A[j] > K:
            ans = ":("

print(ans)

Solution (Python):
import sys
ri = lambda: int(sys.stdin.readline())
li = [ri() for _ in range(6)]
print(':(' if li[4] - li[0] > li[5] else 'Yay!')

Solution (Python):
import sys
ri = lambda: int(sys.stdin.readline())
li = [ri() for _ in range(6)]
print(':(' if li[4] - li[0] > li[5] else 'Yay!')

Solution (Python):
import sys
rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

li = [ri() for _ in range(6)]
print(':(' if li[4] - li[0] > li[5] else 'Yay!')

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

k = int(input())

ans = 0
for i in range(5):
  for j in range(5):
    if (x[i] - x[j]) > k:
      print(':(')
      exit(0)

print('Yay!')

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

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

Solution (Python):
a = int(input())
input()
input()
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())
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 i in range(6)]

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())
s = list(sorted([a, b, c, d, e]))
d_min = s[0]
d_max = s[-1]
if d_max - d_min > k:
    print(":(")
else:
    print("Yay!")

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

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

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

k = int(input())

max_dist = max(antena)
min_dist = min(antena)

l = max_dist - min_dist

if l <= 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):
n=[int(input()) for i in range(6)]
x=n[5]+1
flg=0
if n[1]-n[0] < x and n[2]-n[0] < x and n[3]-n[0] < x and n[4]-n[0] < x:
    if n[2]-n[1] < x and n[3]-n[1] < x and n[4] - n[1] < x:
        if n[3]-n[2] < x and n[4]-n[2] < x:
            if n[4]-n[3] < x:
                flg=1
print(':(' if flg==0 else 'Yay!')

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

Solution (Python):

import sys
input = sys.stdin.readline
a =[]
for i in range(5):
    x = int(input())
    a.append(x)
k = int(input())


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

Solution (Python):
import itertools
*l, k = [int(input()) for _ in range(6)]

c = itertools.combinations(l, 2)

for x, y in c:
    if abs(x-y) > k:
        print(':(')
        exit()

print('Yay!')

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

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

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

for i in range(len(l)):
    for j in range(i+1, len(l)):
        if l[j] - l[i] > k:
            p = False
            break          
if p :
    print("Yay!")
else:
    print(":(")

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

Solution (Python):
import itertools

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

count = 0
for p in itertools.permutations(antenna, 2):
    x, y = p
    if abs(x - y) > k:
        count += 1

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

Solution (Python):
*ant, k = [int(input()) for _ in range(6)]
print(':(' if ant[-1] - ant[0] > k else 'Yay!')

Solution (Python):
l = []
for i in range(5):
    l.append(int(input()))
k = int(input())
ok = True
for i in range(5):
    for j in range(5):
        if i == j: continue
        diff = abs(l[i] - l[j])
        if diff > k:
            ok = False
if ok: print('Yay!')
else: print(':(')

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

Solution (Python):
lst = []
for i in range(5):
  t = int(input())
  lst.append(t)
sorted(lst)
k = int(input())
print('Yay!' if max(lst) - min(lst) <= 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,*_,e,k=map(int,open(0))
print('Y:a(y !'[e-a>k::2])

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

Solution (Python):
def INT():
    return int(input())

def MI():
    return map(int, input().split())

def LI():
    return list(map(int, input().split()))

p = [INT() for i in range(5)]
k = INT()

p.sort()
flg = False

for i in range(5):
    for j in range(i, 5):
        if abs(p[j] - p[i]) > k:
            flg = True
            break
            
print(":(" if flg else "Yay!")

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

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

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

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

Solution (Python):
*l,k=map(int,open(0).read().split())
from itertools import permutations 
perm = permutations(l, 2) 
ans=[]
for i in list(perm): 
  ans.append(i[1]-i[0])
print("Yay!" if max(ans)<= k else ":(")

Solution (Python):


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

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

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

Solution (Python):
import sys
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
L=[a,b,c,d,e]
for i in range(4):
  for j in range(i+1,5):
    if abs(L[i]-L[j])>k:
      print(":(")
      sys.exit()
print("Yay!")

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

print(':(' if A[4]-A[0] > K else 'Yay!')

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

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

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

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

    nums = []
    nums.extend([a, b, c, d, e])
    nums.reverse()

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

main()

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

Solution (Python):
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
K=int(input())
a=(E-A)
if K>=a:
    print('Yay!')
else:
    print(':(')

Solution (Python):
from sys import stdin
def main():
    
    readline=stdin.readline
    li=[int(readline()) for _ in range(5)]
    k=int(readline())

    for i in range(1,5):
        if k<li[i]-li[0]:
            print(":(")
            break
    else:
        print("Yay!")
        
if __name__=="__main__":
    main()

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

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

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

Solution (Python):
A = []
for i in range(5):
  a = int(input())
  A.append(a)
k = int(input())  
for i in range(5):
  for j in range(i,5):
    if A[j] -A[i] <= k:
      pass
    else:
      print(":(")
      quit()
print("Yay!")

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

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

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


if __name__ == '__main__':
    solve()

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

Solution (Python):
ais = [int(raw_input()) for _ in range(5)]
k = int(raw_input())
print ':(' if ais[0] + k < ais[-1] else 'Yay!'

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

Solution (Python):
import sys

a = int(sys.stdin.readline())
b = int(sys.stdin.readline())
c = int(sys.stdin.readline())
d = int(sys.stdin.readline())
e = int(sys.stdin.readline())
k = int(sys.stdin.readline())

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

Solution (Python):
import sys

a = int(sys.stdin.readline())
b = int(sys.stdin.readline())
c = int(sys.stdin.readline())
d = int(sys.stdin.readline())
e = int(sys.stdin.readline())
k = int(sys.stdin.readline())

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

Solution (Python):
d = list(map(int, open(0)))
k = d.pop()
for s in d:
    for t in d:
        if abs(s-t) > k:
            print(':(')
            exit()
print('Yay!')

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

Solution (Python):
import sys
a = []
for l in sys.stdin:
    a.append(int(l))
if (max(a[:-1]) - min(a[:-1])) <= a[-1]:
  print('Yay!')
else:
  print(':(')

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

Solution (Python):
abcde=[int(input()) for i in range(5)]
k=int(input())
for i in range(0,5):
  for j in range(i+1,5):
    if abcde[j]-abcde[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(":(")
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]
for i in range(len(List)):
    for j in range(i+1,len(List)):
        if List[j]-List[i]>k:
            print(":(")
            exit()
print("Yay!")

Solution (Python):
a=[int(input()) for i in range(5)]
k=int(input())
x=max(a)-min(a)
if x<=k:
  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):
import itertools
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
l = [a, b, c, d, e]
for v in itertools.combinations(l, 2):
    if abs(v[0]-v[1]) > k:
        print(':(')
        exit()
print('Yay!')

Solution (Python):
mn, mx = float('inf'), -float('inf')
for i in range(5):
    a = int(input())
    mn = min(mn, a)
    mx = max(mx, a)
k = int(input())
if mx - mn > k:
    print(":(")
else:
    print("Yay!")

Solution (Python):
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readline_s = sys.stdin.readline
readlines = sys.stdin.buffer.readlines


def main():

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

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

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):

*a, k = map(int, open(0).read().split())
if max(a) - min(a) <= k:
    print('Yay!')
else:
    print(':(')

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

max_diff = max(A) - min(A)

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

Solution (Python):

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

ant = [a,b,c,d,e]
flg = True
for i in range(5):
    for j in range(5):
        if i != j:
            
            dist = abs(ant[i]-ant[j])
            if dist > k:
                flg = False
                break
if flg:
    print('Yay!')
else:
    print(':(')

Solution (Python):
d = []
for i in range(5):
    d.append(int(input()))
k = int(input())
for i, j1 in enumerate(d[:5]):
    for j2 in d[i+1:]:
        if (j1 - j2) ** 2 > k ** 2:
            print(':(')
            exit()
print('Yay!')

Solution (Python):
d = []
for i in range(5):
    d.append(int(input()))
k = int(input())
for i, j1 in enumerate(d[:5]):
    for j2 in d[i+1:]:
        if (j1 - j2) ** 2 > k ** 2:
            print(':(')
            exit()
print('Yay!')

Solution (Python):
import sys

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

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

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

print("Yay!")

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

    for i in range(5):
        for j in range(i+1,5):
            if (a[j] - a[i]) <= k:
                continue
            else:
                return ':('

    return 'Yay!'

print(main())

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

Solution (Python):
v=list(map(int,open(0).read().split()))
print(":("if v[5]<v[4]-v[0]else"Yay!")

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

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

Solution (Python):
import math
l=[]
f=0
for i in range(5):
    z=int(input())
    l.append(z)
k=int(input())
for i in range(4):
    for j in range(1,5):
        if math.fabs(l[i]-l[j])>k:
            f=1
            break
if f==1:
    print(":(")
else:
    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())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

x = e - a

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

Solution (Python):
lis = []

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

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

print("Yay!")

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

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

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

m=min(a,b,c,d,e)
M=max(a,b,c,d,e)

if M-m<=k:
  print("Yay!")
else:
  print(":(")