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

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

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

able_poles = 0
for i in range(4):  
    for j in range(i+1, 5):
        if abs(poles[i]-poles[j]) <= k:
            able_poles += 1
if able_poles == 10:  
    print('Yay!')
else:
    print(':(')

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

Solution (Python):
a,b,c,d,e,f = list(int(input()) for _ in range(6))
print("Yay!" if e-a<= f else ":(")

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

Solution (Python):
l = [int(input()) for _ in [0] * 6]

k=l.pop()

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

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

Solution (Python):
"""
author : halo2halo
date : 12, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

ADK = list(map(int, read().split()))
print('Yay!' if ADK[4] - ADK[0] <= ADK[-1] else ':(')

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

f = True

for i in range(5):
    if a[4] - a[0] > a[5]:
        f = False

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

li = list(itertools.combinations(li, 2))
flag = True
for i,j in li:
    if j-i>k:
        flag = False
        break

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

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

l = [a, b, c, d, e]
cnt = 0

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

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

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

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

flg = True
for i in range(len(antena)):
  for j in range(len(antena)):
    if antena[i] - antena[j] > k:
      flg = False
      break
    
if flg:
  print('Yay!')
else:
  print(':(')

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

for i in range(5):
    for j in range(i, 5):
        if k < abs(antenna[i] - antenna[j]):
            print(":(")
            quit()

print("Yay!")

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

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

Solution (Python):
import itertools

aList = []

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

k = int(input())

aiList = list(itertools.combinations(aList,2))

for j in aiList:
  if j[1] - j[0] >k:  
    print(":(")
    exit(0)

print("Yay!")

Solution (Python):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
s = sorted([a,b,c,d,e])
print(':(' if s[-1] - s[0] > k else 'Yay!')

Solution (Python):
l = []
for i in range(5):
  a = int(input())
  l.append(a)
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):
a = [int(input()) for i in range(6)]
if a[1]-a[0] > a[5] or a[2]-a[0] > a[5] or a[3]-a[0] > a[5] or a[4]-a[0] > a[5] or a[2]-a[1] > a[5] or a[3]-a[1] > a[5] or a[4]-a[1] > a[5] or a[3]-a[2] > a[5] or a[4]-a[2] > a[5] or a[4]-a[3] > a[5]:
    print(":(")
else:
    print("Yay!")

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

for i in range(5):
    for j in range(i+1,5):
        ans.append((a[i]-a[j])**2)
if max(ans) <= k**2:
    print("Yay!")
else:
    print(":(")

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

Solution (Python):
import sys
import math
stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

a = []
for _ in range(5):
    a.append(ni())
k = ni()

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

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

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

Solution (Python):
l=[int(input()) for x in range(5)]
k=int(input())
ans='Yay!'
for l1 in l:
  for l2 in l:
    if abs(l1-l2) > k:
      ans=':('
      
print(ans)

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

ok = True
for i in range(4):
    left = antennas[i]
    for a in antennas[i+1:]:
        if a - left > k:
            ok = False
            break
    if not ok:
        break

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

Solution (Python):
a = []
for _ in range(5):
    a.append(int(input()))
k = int(input())
flag = True
for i in range(4):
    for j in range(i+1,5):
        if a[j]-a[i]>k:
            flag=False
if flag:
    print('Yay!')
else:
    print(':(')

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

combi = list(itertools.combinations(Antennas, 2))

flag = True
for c in combi:
    if abs(c[0]-c[1]) > K:
        flag = False

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

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

x = [a, b, c, d]
y = [b, c, d, e]

def chk(x, y):
    return(abs(x - y))


result = 'Yay!'
for i in x:
    for j in y:
        if i != j:
            if chk(i, j) > k:
                result = ':('

print(result)

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

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

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

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

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

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

Solution (Python):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a=INT()
    b=INT()
    c=INT()
    d=INT()
    e=INT()
    f=INT()
    if e-a<=f:
        print('Yay!')
    else:
        print(':(')
if __name__ == '__main__':
    do()

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

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

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

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

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

Solution (Python):
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):
arr=[]
for _ in range(6):
    arr.append(int(input()))

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

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

k=s[5]
if max(s[:6])-min(s[:6]) >k:
    print(":(")
else:
    print("Yay!")

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

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

Solution (Python):
a = [int(input()) for _ in range(6)]
count = 0
for i in range(5):
    for j in range(i+1, 5):
        if abs(a[i] - a[j]) > a[5]:
            count += 1
            break
        else:
            continue
    break

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

Solution (Python):
l=[]
t=1
l.append(int(input()))
l.append(int(input()))
l.append(int(input()))
l.append(int(input()))
l.append(int(input()))
k=int(input())
for i in range(4):
    for j in range(i+1,5):
        if abs(l[i]-l[j])>k:
            t=0
            print(':(')
            break
    break
if t:
    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 itertools
lst=[]
for i in range(5):
  lst.append(int(input()))
k=int(input())
l=list(itertools.combinations(lst,2))
flg=True
for i in l:
  if (i[1]-i[0]) > k:
    flg = False
print("Yay!" if flg else ":(")

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

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

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

if lst[4]-lst[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(':(')
    exit(0)
print('Yay!')

Solution (Python):
a,b,c,d,e,k=map(int,open(0))
print((":(","Yay!")[e-a<=k])

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

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):
S = []
S.append(int(input()))
S.append(int(input()))
S.append(int(input()))
S.append(int(input()))
S.append(int(input()))
ch = int(input())
for i in range(len(S)):
	for j in range(i,len(S)):
		if(S[j]-S[i]>ch):
			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(":(")
    exit(0)
print("Yay!")

Solution (Python):
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7


*A, K = [int(sys.stdin.buffer.readline()) for _ in range(6)]
ok = A[-1] - A[0] <= K
if ok:
    print('Yay!')
else:
    print(':(')

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



array=[a,b,c,d,e]
if(max(array)-min(array) <= k):
    print("Yay!")
else:
    print(":(")

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

ans = 0

for i in range(N):
  for j in range(i+1, N):
    if abs(A[i] - A[j]) > k:
      ans += 1

if ans > 0:
  print(':(')
else:
  print('Yay!')

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

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

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

Solution (Python):
def examA():
    X = [I() for _ in range(5)]
    k = I()
    X.sort()
    ans = "Yay!"
    if X[-1]-X[0]>k:
        ans = ":("
    print(ans)
    return

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,inf
mod = 10**9 + 7
inf = float('inf')

if __name__ == '__main__':
    examA()

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

Solution (Python):
def solve():
    *antenna, k = map(int, open(0).read().split())
    
    if k < antenna[4] - antenna[0]:
        print(':(')
    else:
        print('Yay!')


if __name__ == '__main__':
    solve()

Solution (Python):
import math

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

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

print("Yay!")

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

Solution (Python):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
list = [a, b, c, d, e]
result = []
for i in range(len(list)):
    for j in range(len(list)):
        result.append(list[i]-list[j])
if max(result) >  k:
    print(":(")
else:
    print("Yay!")

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

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

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

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

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

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

for i in range(4):
  for _ in range(1,5):
    if abs(x[i] - x[_]) > k:
      print(":(")
      exit()
print("Yay!")

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

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

print(ans)

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

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

ans = "Yay!"
for i in range(5):
    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() )
print( [ ":(", "Yay!" ][ max( a, b, c, d, e ) - min( a, b, c, d, e ) <= k ] )

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

x = list([a,b,c,d,e])
y = sorted(x)

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

else:
    print(':(')

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

if k >= max(a,b,c,d,e) - min(a,b,c,d,e):
    print('Yay!')

else:
    print(':(')

Solution (Python):
import itertools
l = list()
for i in range(5):
    l.append(int(input()))
it = list(itertools.combinations(l, 2))
k = int(input())
for i in it:
    if abs(i[0] - i[1]) <= k:
        continue
    else:
        print(":(")
        quit()
print("Yay!")

Solution (Python):
*Antennas, k = map(int, open(0).read().split())
if Antennas[4] - Antennas[0] > k :
	print(":(")
else :
	print("Yay!")

Solution (Python):
import itertools

lst = [None]*5
for i in range(5):
    s=input()
    lst[i]=s
k = int(input())

lst_sub=[]
lst_C = list(itertools.combinations(lst,2))
for j in range(len(lst_C)):
    sub = abs(int(lst_C[j][0])-int(lst_C[j][1]))
    lst_sub.append(sub)

if max(lst_sub)>k:
    print(":(")
else:
    print("Yay!")

Solution (Python):

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

flg = True
for i, v1 in enumerate(lst):
  for j, v2 in enumerate(lst):
    if abs(v1 - v2) > k:
      flg = False
      break
  if not flg:
    break

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

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

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

Solution (Python):
A= int(input())
for i in range(3):
  B = 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 = input()
b = input()
c = input()
d = input()
e = input()
k = input()

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

else:
    print ":("

Solution (Python):
x = []
for i in range(6):
    x.append(int(input()))
if x[5] >= (max(x[:5])-min(x[: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())
input()
input()
input()
e = int(input())
k = int(input())
print("Yay!" if a + k >= e else ":(")

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

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

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

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

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

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

l = [b,c,d,e]

ans = 'Yay!'

for i in range(len(l)):
    if ((l[i]- a) > n):
        ans = ':('
        break

print(ans)

Solution (Python):
n = 5
A = [None] * n

for i in range(n):
    A[i] = int(input())

A.sort()
k = int(input())

b = A[0]
for i in range(n):
    for ii in range(n)[i::]:
        if A[ii] - A[i] > k:
            print(':(')
            exit()
print('Yay!')

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

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

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

Solution (Python):


list = [0,0,0,0,0]

for i in range(5):
  list[i] = int(input())
  
flag = True

kyori = 0

k = int(input())

for i in range(4):
    for j in range(i + 1,5):
        if list[i] > list[j]:
            kyori = list[i] - list[j]
        else:
            kyori = list[j] - list[i]
            
        if kyori > k:
            flag = False

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

Solution (Python):
a = int(input())
b = input()
c = input()
d = 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())
print("Yay!" if max(A)-min(A)<=K 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):
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):
from itertools import combinations

*ant, k = [int(input()) for i in range(6)]
for c in combinations(ant, 2):
  x, y = c
  if (y - x) > k:
    print(":(")
    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("Yay!")
else:
  print(":(")

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

t = max(l)-min(l)

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

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

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

Solution (Python):
S = []
flag = 0

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

k = int(input())

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

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

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

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

print("Yay!")

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

Solution (Python):
l = []

for i in range(4+1):
    l.append(int(input()))

k = int(input())

ans = "Yay!"

for elm1 in l:
    for elm2 in l:
        if elm2 - elm1 > k:
            ans = ":("

print(ans)

Solution (Python):
n = 5
lst = []
for i in range(n):
    lst.append(int(input()))
k = int(input())
lst.sort()
if lst[4] - lst[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())
f = [a,b,c,d,e]

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

Solution (Python):
arr = []
  
for i in range(5):
    x = int(input())
    arr.insert(i, x)

k = int(input())
flag = 0
for i in range(5):
    for j in range(5):
        if abs(arr[i]-arr[j]) > k:
            flag = 1
            break

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

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

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

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

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

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

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

l = []

l.append(abs(a - b))
l.append(abs(a - c))
l.append(abs(a - d))
l.append(abs(a - e))
l.append(abs(b - c))
l.append(abs(b - d))
l.append(abs(b - e))
l.append(abs(c - d))
l.append(abs(c - e))

for x in l:
    if x > k:
        print(':(')
        exit()

print('Yay!')

Solution (Python):
from itertools import combinations

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

for p, q in combinations([a, b, c, d, e], 2):
    if q - p > k:
        print(":(")
        break
else:
    print("Yay!")

Solution (Python):
l=[int(input()) for i in range(5)]
n=int(input())
a=max(l)
b=min(l)
if(n>=a-b):
  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 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(b-e)>k or abs(c-d)>k or abs(c-e)>k or abs(d-e)>k:
    print(':(')
else:
    print('Yay!')

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

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

k=l[5]
flag=True
import math
for i in range(5):
  for j in range(5):
    if abs(l[i]-l[j])>k:
      flag=False
if flag:
  print("Yay!")
else:
  print(":(")

Solution (Python):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k=int(input())
V=[a,b,c,d,e]
V.sort()
if V[4]-V[0]<=k:
    print("Yay!")
else:
    print(":(")

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

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 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(b-e) > k or abs(c-d) > k or abs(c-e) > k or abs(d-e) > k:
  print(':(')
else:
  print('Yay!')

Solution (Python):
usrInput = []
flag = False
for n in range(6):
    usrInput.append(int(input()))

for l in range(5):
    for m in range(5):
        if abs(int(usrInput[l]) - int(usrInput[m])) > usrInput[5]:
            flag = True

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

Solution (Python):
A = [0] * 5

for i in range(5):
    A[i] = int(input())
K = int(input())

flag = 0
for i, a in enumerate(A):
    for j, a2 in enumerate(A[i+1:]):
        if abs(a2 - a) > K:
            flag = 1

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

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

Solution (Python):

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

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

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

if (max(i[0:5])-min(i[0:5])) <= i[5]:
  print('Yay!')
else:
  print(":(")

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

k = i.pop(5)
if (max(i)-min(i)) <= k:
  print('Yay!')
else:
  print(":(")

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

k = i.pop()
if (max(i)-min(i)) <= 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 abs(a-b) > k or abs(b-c) > k or abs(c-d) > k or abs(d-e) > k or abs(a-d) > k or abs(a-c) > k or abs(a-e) > k or abs(b-d) > k or abs(b-e) > k or abs(c-e) > k:
    print(":(")
else:
    print("Yay!")