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())
b = max(a)
c = min(a)
if b-c<=k:
    print('Yay!')
else:
    print(':(')

Solution (Python):

count=0
a=[]
for i in range(5):
    a.append(input())
K=int(input())
a.sort(reverse=True)

for j in range(5):
    for k in range(5):
        if int(a[j])-int(a[k])>K:
            count+=1


if count>0:
    print(":(")
else:
    print("Yay!")

Solution (Python):


antennas = list()


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

distance_range = int(input())

result = 'Yay!'

for i in range(len(antennas) - 1):
    for j in range(1, len(antennas)):
        if distance_range < antennas[j] - antennas[i]:
            result = ':('
            break

print(result)

Solution (Python):
from sys import stdin
from itertools import combinations


def solve(nums):
    *positions, k = nums
    fst, last = positions[0], positions[-1]
    return abs(fst - last) <= k


def main():
    nums = [int(l) for l in stdin.readlines()]
    ans = solve(nums)
    print('Yay!' if ans else ':(')

if __name__ == '__main__':
    main()

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

ans = []
for i in range(5):
    for j in range(5):
        ans.append(abs(l[i] - l[j])>k) 

print(['Yay!',':('][any(ans)])

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())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
input = [a,b,c,d,e]
answer = "Yay!"

for count1 in range(0,5):
    for count2 in range(0,5):
        stock = input[count2] - input[count1]
        if stock > k:
            answer = ":("
            break
print(answer)

Solution (Python):
antennas = []

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

k = int(input())

if max(antennas) - min(antennas) > 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())

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

Solution (Python):

import sys


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



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

if __name__ == '__main__':
    main()

Solution (Python):
anths = []
for i in range(5):
    anths.append(int(input()))
k = int(input())
from itertools import combinations

for a, b in combinations(anths, 2):
    if abs(a-b) > k:
        print(":(")
        exit()

print('Yay!')

Solution (Python):


antenna = [int(input()) for i in range(0,5)]
k=int(input())

distance = [[0,0,0,0,0] for i in range(len(antenna)) ]

flag = 0
for jj in range(len(antenna)):
    for kk in range(len(antenna)):
        distance[jj][kk]=abs(antenna[jj]-antenna[kk])
        if distance[jj][kk] > k:
            flag = 1

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

Solution (Python):
list = []
for i in range(6):
    list.append(int(input()))
if list[4] - list[0] > list[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):
l = []

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

k = int(input())

if max(l) - min(l) > 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())

if e-a <= k and a < b < c < d < e:
  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=input()
b=input()
c=input()
d=input()
e=input()
k=input()
a=int(a)
b=int(b)
c=int(c)
d=int(d)
e=int(e)
k=int(k)
if k<e-a:
    print(":(")
elif k>=e-a:
    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):
x = [0] * 5
for i in range(5) : x[i] = int(input())
x.sort()
k = int(input())
if x[4] - x[0] <= k : print("Yay!")
else : print(":(")

Solution (Python):
import sys
a = [int(l) for l in sys.stdin]    
k = a[-1]
a = sorted(a[:-1])

is_far = False
for x in reversed(a):
  if (x - a[0]) > k:
    is_far = True
    break

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

Solution (Python):
import sys


def input():
    return sys.stdin.readline()[:-1]








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):
'''input
1
2
4
8
9
15
'''

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


for i in range(5):
	for j in range(5-i):
		if abs(a[i+j]-a[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):
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('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())
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('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())
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('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())
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("Yay!")
else:
    print(":(")

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

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

Solution (Python):

"""
A - Five Antennas
https://atcoder.jp/contests/abc123/tasks/abc123_a

"""
import sys


from itertools import combinations

def solve(antennas, k):
    for a, b in combinations(antennas, 2):
        if abs(a-b) > k:
            return ':('
    return 'Yay!'


def main(args):
    antennas = [int(input()) for _ in range(5)]
    k = int(input())
    ans= solve(antennas, k)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

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

Solution (Python):
l = []; t = True
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 abs(l[j] - l[i]) > k:
      t = False
      break
if t:
  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())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if (max(a,b,c,d,e) - min(a,b,c,d,e)) > k:
    print(":(")
else:
    print("Yay!")

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

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

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

an = [a, b, c, d, e]
an.sort()

if an[4] - an[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):
antenna = []
antenna.append(int(input()))
antenna.append(int(input()))
antenna.append(int(input()))
antenna.append(int(input()))
antenna.append(int(input()))
k = int(input())

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

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 i != j and k < j - i:
            ans = 1

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

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

if list1[4] - list1[0] > int(input()):
  print(":(")
else:
  print("Yay!")

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

Solution (Python):
from sys import stdin


def main():
    a, b, c, d, e, k = [int(stdin.readline()) for _ in range(6)]
    print('Yay!' if (e - a) <= k else ':(')


if __name__ == "__main__":
    main()

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

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

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

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

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

if(e - a > k):
  print(":(")
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())
i = [a,b,c,d,e]
x = 0
for num1 in range(5):
	for num2 in range(5):
		if num2 > num1:
			ans = i[num2] - i[num1]
			if ans > k:
				x += 1

if x == 0:
	print("Yay!")
elif x != 0:
	print(":(")

Solution (Python):
import sys
data = []
for i in range(5):
    data.append(int(input()))
k = int(input())
data.sort()
for i in range(5):
    for j in data[i+1:]:
        if j - data[i] > k:
            print(':(')
            sys.exit()
        else:
            continue
print('Yay!')

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

Solution (Python):
l = [int(input()) for i in range(5)]
if l[4]-l[0] <= int(input()):
    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):
import sys
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()) for _ in range(5)]
k = int(input())

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

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

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

Solution (Python):
a = int(input())
for i in range(3):
	x = int(input())

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

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

b = 0
for i in range(5):
    if b == 1:
        break
    for j in range(4-i):
        ans = abs(int(a[i]) - int(a[j+1]))
        if ans > int(a[5]):
            print(':(')
            b = 1
            break
        
    if i == 4 and b == 0:
        print('Yay!')

Solution (Python):
import sys
import subprocess
import re
import datetime
import os

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

A = [a,b,c,d,e]
S = sorted(A)



V = (S[4] - S[0])
if V <= 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())

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

for i in range(0, 5):
    if abs(nums[i] - nums[i-1]) > 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):
t_list=[int(input()) for i in range(5)]
k = int(input())

def hoge(t_list, k):
  for i in range(5):
    for j in range(5):
      if abs(t_list[i] - t_list[j]) > k :
        return(":(")
  return("Yay!")

print(hoge(t_list, k))

Solution (Python):
l = sorted(list(map(int, [input() for i in range(5)])))
k = int(input())

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

Solution (Python):


def main(X, k):
    flag = True
    for i in range(5):
        for j in range(5):
            if(abs(X[i]-X[j]>k)):
                flag = False
                break
    print("Yay!" if flag else ":(")
    

if __name__ == '__main__':
    X = []
    for i in range(5):
        X.append(int(input()))
    k = int(input())
    
    main(X, 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(':(')
else:	
	print('Yay!')

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(1000000)



def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))



def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in sys.stdin.readline().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v

def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False



dp = None


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

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


main()

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

Solution (Python):
num = list()
for ii in range(5):
    num.append(int(input()))
dist = int(input())

if num[-1] - num[0] <= dist:
    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):
    b=int(input())
    a.append(b)
c=int(input())
if a[4] - a[0] <= c:
    print('Yay!')
else:
    print(':(')

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

a = inputList[0]
d = inputList[4]
k = inputList[5]

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

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

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

ds = []
for idx, antenna in enumerate(antennas):
    for j in range(idx+1, 5):
        ds.append(antennas[j] - antenna)

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

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

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

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

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

Solution (Python):
INPUT_NUM = 5
numbers = tuple(int(input()) for _ in range(INPUT_NUM))
dist_k = int(input())

can_direct_connect = True
for i in range(INPUT_NUM - 1):
    for j in range(INPUT_NUM - 1 - i):
        dist = numbers[j + i + 1] - numbers[i]
        if dist > dist_k:
            can_direct_connect = False
            break
    if not can_direct_connect:
        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())


def calc(m, n):
    return True if n - m > k else False


set_list = [(a, b), (a, c), (a, d), (a, e), (b, c),
            (b, d), (b, e), (c, d), (c, e), (d, e)]

ans = 'Yay!'
for i in range(len(set_list)):
    m, n = set_list[i]
    if calc(m, n):
        ans = ':('
        break

print(ans)

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 print(':(')

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

input_size = len(input_val)
count = 0
for i in range(5) :
    stan_val = input_val[i]
    for j in range(i+1,5) :
        diff = abs(stan_val - input_val[j])
        if diff > input_val[5] :
            count += 1
            
        else : count = count

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

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

k = int(input())
for i in range(1, 5):
    for j in range(i):
        if (antenna[i] - antenna[j]) > k:
            far_antenna += 1
            break
        else:
            continue
if far_antenna != 0:
    print(":(")
else:
    print("Yay!")

Solution (Python):

antena_pos=[int(input()) for _ in range(5)]
k=int(input())
max_dist=antena_pos[-1]-antena_pos[0]

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


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

l=[a,b,c,d,e]
size=len(l)
for i in range(size):
 for j in range(i,size):
  if i == j:
   continue
  if (l[j]-l[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())

l=[]

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

size=len(l)
for i in range(size):
 for j in range(i,size):
  if i == j:
   continue
  if (l[j]-l[i]) > k:
   print(":(")
   exit()

print("Yay!")

Solution (Python):



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

    exist = points[4] - points[0] > k

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


if __name__ == '__main__':
    main()

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

max_dist = antena_pos[-1] - antena_pos[0]

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

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

flg = False
for i in range(0, 5):
    for j in range(0, 5):
        if abs(coor[i] - coor[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(':(')
else:
	print('Yay!')

Solution (Python):
antenna_coordinates = [int(input()) for i in range(5)]
distance_limit = int(input())
result = 'Yay!'

for i in range(1, 5):
    if abs(antenna_coordinates[0] - antenna_coordinates[i]) > distance_limit:
        result = ':('
        break

print(result)

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

def func():
    for i in range(4):
        for j in range(i,5):
            if abcde[j]-abcde[i] > k:
                return ":("
    return "Yay!"
  
print(func())

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

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

if 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):
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
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

L = [int(input()) for _ in range(6)]
k = L.pop(-1)
ans = "Yay!"
if max(L)-min(L) > k:
    ans = ":("
print(ans)

Solution (Python):
List = list(map(int, [input() for _ in range(5)]))
k = int(input())

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

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

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

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

Solution (Python):


from bisect import bisect_left as binl

def intin():
    input_tuple = input().split()
    if len(input_tuple) <= 1:
        return int(input_tuple[0])
    return tuple(map(int, input_tuple))


def intina():
    return [int(i) for i in input().split()]


def intinl(count):
    return [intin() for _ in range(count)]


def modadd(x, y):
    global mod
    return (x + y) % mod


def modmlt(x, y):
    global mod
    return (x * sy) % mod


def lcm(x, y):
    while y != 0:
        z = x % y
        x = y
        y = z
    return x





def main():
    poslist = intinl(5)
    k = intin()

    for i in poslist:
        for j in poslist:
            if abs(j - i) > k:
                print(':(')
                return 0

    print('Yay!')


if __name__ == '__main__':
    main()

Solution (Python):
a =int(input())
b =int(input())
c =int(input())
d =int(input())
e =int(input())
k =int(input())
AC = [a, b, c, d, e]
for i in range(4):
  for j in range(i+1, 5):
    if AC[j]-AC[i] > k:
      print(":(")
      break
  else:
    continue
  break
if e-a <=k:
  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 = sorted(list(map(int, [input() for i in range(5)])))
k = int(input())
if (a[4] - a[0]) <= k:
  print('Yay!')
else:
  print(':(')

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

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

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

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

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

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

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

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

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

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

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

a = [None] * 5
for _ in range(5):
    a[_] = ti()

k = ti()

def solve():
    for x in a:
        d = x-a[0]
        if d > k:
            return ':('
    return 'Yay!'

print(solve())

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

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

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

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

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

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

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

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

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

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

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

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

t = [0] * 6
for i in range(6):
    t[i] = int(input())

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

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

Solution (Python):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if len(list(filter(lambda x: x>k,[b-a,c-a,d-a,e-a,c-b,d-b,e-b,d-c,e-c,e-d]))) > 0:
    print(":(")
else:
    print("Yay!")

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

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