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

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

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

flag = False

for i in range(5):
    for j in range(i, 5):
        if anntena[j] - anntena[i] > k:
            flag = True
            print(":(")
        if flag:
            break
    if flag:
        break

if not flag:
    print("Yay!")

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]

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

Solution (Python):

import copy
import numpy as np
import random
import bisect 

length = []

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

k = int(input())

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

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

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

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

k = int(input())

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

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

if max(d) > k:
    ans = ':('
else:
    ans = 'Yay!'

print(ans)

Solution (Python):
s = []
for i in range(5):
    s.append(int(input()))
k = int(input())
flag = True
for x in s:
    for y in s:
        if x != y:
            z = x - y
            if z <= k:
                pass
            else:
                flag = False
if flag:
    print('Yay!')
else:
    print(':(')

Solution (Python):
import sys

l = raw_input().split()
a = int(l[0])
l = raw_input().split()
b = int(l[0])
l = raw_input().split()
c = int(l[0])
l = raw_input().split()
d = int(l[0])
l = raw_input().split()
e = int(l[0])
l = raw_input().split()
k = int(l[0])
if b - a > k:
    print(':(')
    exit()
if c - a > k:
    print(':(')
    exit()
if d - a > k:
    print(':(')
    exit()
if e - a > k:
    print(':(')
    exit()
if c - b > k:
    print(':(')
    exit()
if d - b > k:
    print(':(')
    exit()
if e - b > k:
    print(':(')
    exit()
if d - c > k:
    print(':(')
    exit()
if e - c > k:
    print(':(')
    exit()
if d - e > k:
    print(':(')
    exit()
print('Yay!')

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

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

Solution (Python):


a = int(input())
_ = int(input())
_ = int(input())
_ = int(input())
e = int(input())
k = int(input())

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

print(r)

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




if antena[4] - antena[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())

ok = True
for i in [a, b, c, d, e]:
    for j in [a, b, c, d, e]:
        if abs(j - i) > k:
            ok = False

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

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

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

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

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):
ans = [":(","Yay!"]
p = [int(input()) for _ in range(5)]
k = int(input())
d = p[-1]-p[0]
if d > k:
    print(ans[0])
else:
    print(ans[1])

Solution (Python):
list = []

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

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

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

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

Solution (Python):
a = [ int(input()) for _ in range(5) ]
k = int(input())
 
t = True
for i in range(5):
  for j in range(i+1,5):
    t = abs(a[i]-a[j]) <= k
    if not t:
      break
  if not t:
    break
      
print( "Yay!" if t else ":(" )

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

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

for idx, x in enumerate(antenas):
    for y in antenas[idx:]:
        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())
import sys
ary = [a,b,c,d,e]
for i in ary:
    for j in ary:
        if abs(i-j) > k:
            print(":(")
            sys.exit()
print("Yay!")

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

if e-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())
dis_list = []
dis_list.append(abs(a-b))
dis_list.append(abs(a-c))
dis_list.append(abs(a-d))
dis_list.append(abs(a-e))
dis_list.append(abs(b-c))
dis_list.append(abs(b-d))
dis_list.append(abs(b-e))
dis_list.append(abs(c-d))
dis_list.append(abs(c-e))
dis_list.append(abs(d-e))
if max(dis_list) > k:
    print(':(')
else:
    print('Yay!')

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

Solution (Python):
import numpy as np
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

flg = True
if np.abs(a-b) > k:
    flg = False
if np.abs(a-c) > k:
    flg = False
if np.abs(a-d) > k:
    flg = False
if np.abs(a-e) > k:
    flg = False
if np.abs(b-c) > k:
    flg = False
if np.abs(b-d) > k:
    flg = False
if np.abs(b-e) > k:
    flg = False
if np.abs(c-d) > k:
    flg = False
if np.abs(c-e) > k:
    flg = False
if np.abs(d-e) > k:
    flg = False
    
if flg:
    print('Yay!')
else:
    print(":(")

Solution (Python):
a = [0 for i in range(6)]
for i in range(6):
    a[i] = int(input())
k = a[-1]
max_diff = a[-2] - a[0]
if max_diff > k:
    print(':(')
else:
    print("Yay!")

Solution (Python):


def readInts():
  return [int(s) for s in input().split(" ")]

def main():
  a = readInts()[0]
  b = readInts()[0]
  c = readInts()[0]
  d = readInts()[0]
  e = readInts()[0]
  k = readInts()[0]

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

if __name__ == "__main__":
  main()

Solution (Python):
N = []
for i in range(6):
    n = int(input())
    N.append(n)
K = N.pop()
for i in range(5):
    for j in range(i, 5):
        if N[j] - N[i] > K:
            print(":(")
            exit()
print("Yay!")

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

a = INT()
b = INT()
c = INT()
d = INT()
e = INT()
k = INT()

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

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

flag = False
if ins[4] - ins[0] > k:
    flag = True

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

Solution (Python):
input_line = [int(input()) for i in range(5)]
k = int(input())
if max(input_line) - min(input_line) > 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):
vals = []
for _ in range(5):
	vals.append( int(input()) )

k = int(input())


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

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

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

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

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

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

Solution (Python):
from sys import stdin

data = [int(stdin.readline().rstrip()) for _ in range(5)]
k = int(stdin.readline().rstrip())

isOK = True

for i in range(5):
    for j in range(i+1, 5):
        if abs(data[i] - data[j]) > k:
            isOK = False

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

Solution (Python):
d1 = int(input())
d2 = int(input())
d3 = int(input())
d4 = int(input())
d5 = int(input())
sa = int(input())
data = sorted([d1, d2, d3, d4, d5])
if data[-1] - data[0] > sa:
    print(':(')
else:
    print('Yay!')

Solution (Python):

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

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

Solution (Python):
import math
import functools
import itertools
import numpy as np
import sys
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

A = [I() for i in range(5)]
k = I()
ans = A[-1]-A[0]
if ans <= k:
    print("Yay!")
else:
    print(":(")

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

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

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

flg = True
for x, y in [(a, b), (a, c), (a, d), (a, e), (b, c), (b, d), (b, e), (c, d), (c, e), (d, e)]:
    if y -x <= k:
        continue
    else:
        flg = False
        break
if flg:
    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 or d-a >k or c-a>k or b-a>k or e-b > k or d-b > k or c-b>k or e-c >k or d-c >k or e-d>k:
    print(":(")
else:
    print("Yay!")

Solution (Python):
a=[int(input()) for _ in range(5)]
k=int(input())
for x in a[1:]:
    if x-a[0]>k:
        print(':(')
        ans=False
        break
    else:
        ans=True
if ans==True:
    print('Yay!')

Solution (Python):

a =  int(input())
b =  int(input())
c =  int(input())
d =  int(input())
e =  int(input())
k =  int(input())
f = 0
if abs(a-b) > k:
  f = 1
if abs(a-c) > k:
  f = 1
if abs(a-d) > k:
  f = 1
if abs(a-e) > k:
  f = 1
if abs(b-c) > k:
  f = 1
if abs(b-d) > k:
  f = 1
if abs(b-e) > k:
  f = 1
if abs(c-d) > k:
  f = 1
if abs(c-e) > k:
  f = 1
if abs(d-e) > k:
  f = 1


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

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

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

res = sorted(res)
if res[-1] > 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())
antena=[a,b,c,d,e]
for i in antena:
  for j in antena:
    if abs(i-j)>k:
      print(':(')
      exit()
print('Yay!')

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

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

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

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

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

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

k = int(input())

ans = 0
for i in range(4):
    for j in range(i+1,5):
        if abs(x[i] - x[j]) > k:
            ans = 1

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

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

for i in range(5):
    for j in range(i+1,5):
        if (d[j]-d[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())

ae = e-a

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

Solution (Python):

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

y = True
for i in a [1:]:
    if i - a[0] > k:
        y = False
        break

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

Solution (Python):


import sys

t = [int(input()) for i in range(6)]
for i in range(5):
    for j in range(5):
        if t[j]-t[i] > t[5]:
            print(":(")
            sys.exit()
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):
a=int(input())
input()
input()
input()
e=int(input())
k=int(input())
print("Yay!" * (e-a <= k) or ":(")

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

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

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

Solution (Python):
a=[0]*5
a[0]=int(input())
a[1]=int(input())
a[2]=int(input())
a[3]=int(input())
a[4]=int(input())
k=int(input())
c=0
for i in range(5):
  for j in range(i+1,5):
    if(abs(a[j]-a[i])>k):
      c+=1
if(c!=0):
  print(":(")
else:
  print("Yay!")

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

answer = "Yay!"

if abs(a-b)>k:
    answer = ":("

if abs(a-c)>k:
    answer = ":("

if abs(a-d)>k:
    answer = ":("

if abs(a-e)>k:
    answer = ":("

if abs(b-c)>k:
    answer = ":("

if abs(d-b)>k:
    answer = ":("

if abs(e-b)>k:
    answer = ":("

if abs(c-d)>k:
    answer = ":("

if abs(c-e)>k:
    answer = ":("

if abs(d-e)>k:
    answer = ":("

print(answer)

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):
from itertools import*
a,b,c,d,e,k=map(int,open(0).read().split())
x=[a,b,c,d,e]
for i in combinations(x,2):
    p,q=list(i)
    if abs(p-q)>k:
        print(":(")
        exit()
print("Yay!")

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

kyori = abcde[4]-abcde[0]

if kyori<=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())
lst = [a,b,c,d,e]
for i in lst:
    for j in lst:
        if i - j > k:
            print(":(")
            exit()
            
print("Yay!")

Solution (Python):
import itertools 
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
X=[a,b,c,d,e]
S=list(itertools.combinations(X,2))
ans='Yay!'
for i in range(len(S)):
    if abs(S[i][0]-S[i][1])>k:
        ans=':('
print(ans)

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

Solution (Python):
l=[int(input()) for i in range(6)]
def C():
    for i in range(5):
        for j in range(i, 5):
            if l[j]-l[i]>l[5]:
                return False
    return True
if C():
    print('Yay!')
else:
    print( ':(')

Solution (Python):

l = []

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

l.sort()

th = int(input())

if th < (l[4] - l[0]):
    print(':(')
else:
    print('Yay!')

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

Solution (Python):
a = [int(input()) for _ in range(5)]
k = int(input())
ans = True
for i in range(5):
    try:
        if a[i+1] - a[0] > k:
            ans = False
            break
    except:
        pass
if ans:
    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())

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

Solution (Python):
all_list = []

for i in range(6):
  a = int(input())
  if i < 5:
    all_list.append(a)
  else:
    k = a

M = max(all_list)
m = min(all_list)

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

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

Solution (Python):
l = [int(input()) for _ in range(6)]
k = l.pop(-1)
for i in range(1,len(l)):
    if abs(l[0] - l[i]) > k:
        print(':(')
        exit()
print("Yay!")

Solution (Python):








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

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

for i in range(5):
    for j in range(5):
        if i == j:
            pass
        else:
            if int(A[i]) - int(A[j]) > k:
                print(":(")
                exit()
print("Yay!")

Solution (Python):

 
import math
import numpy as np
import random
import copy
import statistics 
import bisect
import heapq
from collections import defaultdict 
 
arg = [int(input()) for i in range(6)] 
if arg[4] - arg[0] > arg[5]:
    print (":(")
else:
    print ("Yay!")

Solution (Python):

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

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):
l=[int(input()) for i in range(5)]
k=int(input())
A=True
for i in range(4):
  for j in range(i+1,5):
    a=l[j]-l[i]
    if a>k:
      A=False
      break
if A:
  print('Yay!')
else:
  print(':(')

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

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

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

Solution (Python):
a = int(input())
for i in range(4):
  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(':(')
  exit()

print('Yay!')

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

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

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

k=int(input())
if max(L)-min(L)>k:
    print(':(')
else:
    print('Yay!')

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

if __name__ == "__main__":
    main()

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


if  data[4] - data[0] > data[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())

antenna = [a, b, c, d, e]
is_ok = True
for i in range(len(antenna)):
    for j in range(i+1, len(antenna)):
        if antenna[j] - antenna[i] > k:
            is_ok = False

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

Solution (Python):


if __name__ == '__main__':
    a = []
    for _ in range(5):
        a.append(int(input()))
    k = int(input())
    for i in range(5):
        for j in range(i+1, 5):
            if abs(a[i] - a[j]) > k:
                print(":(")
                exit()
    print("Yay!")

Solution (Python):
a=[]
a.append(int(input()))
a.append(int(input()))
a.append(int(input()))
a.append(int(input()))
a.append(int(input()))
k=int(input())
a=sorted(a)
if k >= a[4]-a[0]:
  print("Yay!")
else:
  print(":(")

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

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

k = int(input())

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

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

k = A[5] 
judge = 1
for i in range(5):
  for j in range(5):
    if(abs(A[i]-A[j]) > k):
      judge = 0
      break
   
if(judge == 0):
  print(':(')
else:
  print('Yay!')

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

Solution (Python):


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

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

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


main()

Solution (Python):
inputs = []
for i in range(6):
    tmp = int(input())
    inputs.append(tmp)
    
for i in inputs[:-1]:
    for j in inputs[:-1]:
        d = abs(i - j)
        if d > inputs[-1]:
            print(':(')
            exit()

print('Yay!')

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

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

Solution (Python):
A = [int(input()) for _ in range(5)]
k = int(input())
flag = True
for left in range(4):
    for right in range(left + 1, 5):
        if A[right] - A[left] > k:
            flag = False
if flag:
    print('Yay!')
else:
    print(':(')

Solution (Python):

import itertools
import sys
import math
from functools import lru_cache





from queue import Queue
from operator import mul
from functools import reduce
from queue import Queue
from operator import mul
from functools import reduce
from functools import lru_cache














ll = []

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

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

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

if max(antenna)-min(antenna) > k:
    print(":(")
    exit()
else:
    print("Yay!")

Solution (Python):

"""
Created on Sat Feb 16 20:52:46 2019

@author: Owner
"""


import collections
import scipy.misc
import sys
import numpy as np
import math
from operator import itemgetter
import itertools
import copy
import bisect


def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(int(i))
    i += 1
  if n > 1:
    table.append(int(n))
  return table   

def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []
    
def getNearestValueIndex(list, num):
    """
    概要: リストからある値に最も近い値のインデックスを取得する関数
    @param list: データ配列
    @param num: 対象値
    @return 対象値に最も近い値
    """

    
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

def find_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default


"""
N, X = map(int, input().split())

x = [0]*N
x[:] = map(int, input().split())

P = [0]*N
Y = [0]*N
for n in range(N):
    P[n], Y[n] = map(int, input().split())

    
all(nstr.count(c) for c in '753')


ABT = zip(A, B, totAB)
result = 0

sorted(ABT,key=itemgetter(2))
A, B, totAB = zip(*ABT)
A.sort(reverse=True)


(x >> i) & 1


dp = [np.inf]*N
for n in range(N):
    if n == 0:
        dp[n] = 0
    else:
        for k in range(1,K+1):
            if n-k >= 0:
                dp[n] = min(dp[n], dp[n-k] + abs(h[n]-h[n-k]))
            else:
                break

li, ri = bisect.bisect_left(p_ac, l[i]-1), bisect.bisect_right(p_ac, r[i]-1)    

"""

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