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 :(.



Sample input:
1
2
4
8
9
15


Sample output:
Yay!

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

last = 10
time = 0

for item in array:
	r = item%10
	if r != 0:
		time += (int(item/10)+1)*10
		last = min(last, r)
	else:
		time += item

print(time-10+last)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
i = 0
if b - a < k:
 i += 1
if c - b < k:
 i += 1
if d - c < k:
 i += 1
if e - d < k:
 i += 1
if i == 4:
 print("Yay!")
else:
 print(":(")

Submission status: Wrong Answer

Solution code:
m_list = list()
for k in range(6):
    m = int(input())
    m_list.append(m)

x_list = list()
count = 0
for i in range(len(m_list)):
    for j in range(len(m_list)):
        x_list.append(m_list[i] - m_list[j])

for a in range(36):
    if x_list[a] >=15:
        count += 1

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

Submission status: Wrong Answer

Solution code:
a = int(input().strip())
b = int(input().strip())
c = int(input().strip())
d = int(input().strip())
e = int(input().strip())
k = int(input().strip())



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

cnt = 0

for i in range(0,4):
    for j in range(0,4):
        if (abs(arr[i] - arr[j]) > k):
            cnt = 1

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

Submission status: Wrong Answer

Solution code:
aa = [int(input()) for _ in range(6)]
ans = "Yay!"
for i in range(4):
    for j in range(4):
        if aa[i] - aa[j] > aa[5]:
            ans = ':('
            break
    if ans != "Yay!":
        break
print(ans)

Submission status: Wrong Answer

Solution code:
def getResult(pos, K) :
    for i in range(len(pos)-1) :
        for j in pos[i+1:] :
            if abs(pos[i] - j) > K :
                return ":()"
    return "Yay!"

position = []
for i in range(5) :
    position.append(int(input()))
k = int(input())
print(getResult(position, k))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

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

max = max(li)
min = min(li)

i = abs(max-min)

if i < k:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
li =[int(input()) for i in range(6)]
isexist=True
for i in range(4):
    for j in range(4):
        if li[i]-li[j]<=li[5] and j!=j:
            isexist=False

if isexist==False:
    print(":(")
else: print("Yay! ")

Submission status: Wrong Answer

Solution code:
t = [int(input()) for i in range(5)] 
k = int(input())

c = t
have = False
for i in range(0,5):
    for j in range(0,5):
        if j != i:
            if abs(t[i] - c[j]) > k:
                have = True
    
if have:
    print(":(")
else:
    print("yay")

Submission status: Wrong Answer

Solution code:
n = 5
t = [int(input()) for i in range(n)]
k = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
l = [e, d, c, b, a]
output = []
bad = ':('
ok  = 'Yay!'
for i in range(1, 5):
    d = l[i] - l[4]
    if d >= 15:
        output.append(bad)
    elif d < 15:
        output.append(ok)
if bad in output:
    print(bad)
elif bad not in output:
    print(ok)

Submission status: Wrong Answer

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

l = [a,b,c,d,e]
l2 = sorted(l)
print(l2)
if k >= l2[4]-l2[0]:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin

def main():
    I = [int(input()) for _ in [0] * 6]

    if I[4] - I[0] >= I[5]:
        print(':(')
    else:
        print('Yah!')

input = lambda: stdin.readline().rstrip()
main()

Submission status: Wrong Answer

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

ans = "Yay!"
for i in range(4):
  if a[i+1] - a[i] > k:
    ans = ":("
    
print(ans)

Submission status: Wrong Answer

Solution code:
a=[int(input()) for _ in range(6)]
judge=0
for i in range(5):
    for j in range(5):
        if abs(a[i] - a[j]) < a[5]:
            judge+=1
if judge == 25:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
menu = [int(input()) for _ in range(5)]

cnt = 0
l = [10]
for m in menu:
  cnt += m
  mod = cnt % 10
  if mod != 0:
    cnt += 10 - mod
    l.append(mod)

cnt -= 10 - min(l)
print(cnt)

Submission status: Wrong Answer

Solution code:
str1 = int(input())
str2 = int(input())
str3 = int(input())
str4 = int(input())
str5 = int(input())
str6 = int(input())

flag = 0

if((str5-str4)>str6 or (str4-str3)>str6 or (str3-str2)>str6 or (str2-str1)>str6):
  print(':(')
else:
  print('Yay!')

Submission status: Wrong Answer

Solution code:
anntena_list = []
 
for i in range(5):
    anntena_list.append(int(input()))
    
m = int(input())
    
flag = False
for i in range(4):
  for j in range(4-i):
    if anntena_list[4-i] - anntena_list[j]  > m:
      flag = True
      
if flag:
  print(':C')
else:
  print('Yay!')

Submission status: Wrong Answer

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

k = input()

ans = True
for i in range(0, 3):
    for j in range(i, 4):
        if k < abs(x[i] - x[j]):
            ans = False

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

Submission status: Wrong Answer

Solution code:
import sys
set=[int(input()) for x in range(6)]
ante=set.pop(-1)

for x in set:
    for y in set:
        if x<=y:
            if ante<y:
                print(':(')
                sys.exit()

print("Yay!")

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
a, b, c, d, e, k = (int(input()) for i in range(6))
list, ans = [a, b, c, d, e], 'Yay!'
for i in range(4):
    for j in range(4-i):
        if list[j] - list[i] > k:
            ans = ':('
            break
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input().strip())
b = int(input().strip())
c = int(input().strip())
d = int(input().strip())
e = int(input().strip())
k = int(input().strip())



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

cnt = 0

for i in range(0,3):
    for j in range(1,4):
        if (abs(arr[i] - arr[j]) > k):
            cnt = 1

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

Submission status: Wrong Answer

Solution code:
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

K = int(input())

maxnum = max(A,B,C,D,E)
minnum = min(A,B,C,D,E)

if maxnum - minnum < K :
    print('Yay!')
else :
    print(':(')

Submission status: Wrong Answer

Solution code:
a = [int(input()) for i in range(6)]
b = a.pop(-1)
for i in a:
    for j in a:
        if j - i > b:
            print(":(")
            break

print("Yay!")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
a = stdin.readline().rstrip()

flag = True
for j in range(0, len(a) - 1):
    if int(j) < int(a[-1]):
        flag = False
        break

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

Submission status: Wrong Answer

Solution code:
def __main__():
    P = []
    for i in range(5):
        P.append(int(input()))
    k = int(input())
    
    for i in range(4):
        for j in range(i+1,5):
            if P[i] - P[j] > k:
                print(":(")
                return
    print("Yay!")
    return

if __name__ == "__main__":
    __main__()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
li =[int(input()) for i in range(6)]
isexist=True
for i in range(4):
    if li[i+1]-li[i]<=li[5]:
        isexist=False

if isexist==False:
    print(":(")
else: print("Yay! ")

Submission status: Wrong Answer

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

k = int(input())
li = sorted(li)
if k > li[4] - li[0]:
    print("Yey!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
a = []
for i in range(6):
  po = int(input())
  a.append(po)
           
flag = 0
for i in range(5):
  for j in range(4-i):
    sa = abs(a[i]-a[i+j])
    if sa > a[5]:
      print(":(")
      flag = 1
      break

if flag == 0:
  print("Yay!")

Submission status: Wrong Answer

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

f = 'Yay!'
for i in range(4):
    if l[i+1] - l[i] > k:
        f = ':('
        break

print(f)

Submission status: Wrong Answer

Solution code:
# coding: utf-8

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

possible = True
for i in range(4):
    for j in range(i + 1, 4):
        if abs(antenna[i] - antenna[j]) > k:
            possible = False

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

Submission status: Wrong Answer

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

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

for i in range(4):
    if abs(longth[i] - longth[i+1]) < k:
        continue
    else:
        print(':(')
        break
else:
    print('Yay!')

Submission status: Wrong Answer

Solution code:
A = [int(input()) for _ in range(6)]
for i, l in enumerate(A[0:4]):
  for l2 in A[i+1:4]:
    if not (l2-l <= A[5]):
      print(':(')
      quit()
print('Yay!')

Submission status: Wrong Answer

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

for i in range(4):
    for j in range(4):
        if abs(li[j]) - abs(li[i]) > li[-1]:
            print(":(")
            quit()

print("Yay!")

Submission status: Wrong Answer

Solution code:
anntena_list = []
 
for i in range(5):
    anntena_list.append(int(input()))
    
m = int(input())
    
flag = False
for i in range(4):
    if anntena_list[i+1] - anntena_list[i]  >= m:
      flag = True
      
if flag:
  print(':C')
else:
  print('Yay!')

Submission status: Wrong Answer

Solution code:
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("Yey!")

Submission status: Wrong Answer

Solution code:
A = []
for i in range(6):
    A.append(int(input()))
st = 4 
s = 'Yay!'
for i in range(4): 
    for j in range(st):
        print(A[st-i], A[st-1-j], A[5])
        if A[st-i] - A[st-1-j] > A[5]:
            s = ':('
    if s == ':(':
        break
print(s)

Submission status: Wrong Answer

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

l = [a,b,c,d,e]
l2 = sorted(l)

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

Submission status: Wrong Answer

Solution code:
input_ha = []
for i in range(0,5):
    input_ha.append(int(input()))
max_in = max(input_ha)
min_in = min(input_ha)

k = int(input())

if((max_in - min_in) < k):
    print("Yay!")
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
g=0
if b-a>k or c-b>k or d-c>k or e-d>k: #k以下の時通信可能
  g=1

if g==0: #通信できる
  print("Yay!")
elif g==1:
  print(":(")

Submission status: Wrong Answer

Solution code:
ant = []

for i in range(5):
    ant.append(int(input()))
k = int(input())
flag = 0

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

if flag==0: print('Yey!')

Submission status: Wrong Answer

Solution code:
a = list(range(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(4-i):
        if(abs(a[i]-a[i+j])>k):
            c+=1
if(c>0):
    print(":(")
else:
    print("Yay!")

Submission status: Wrong Answer

Solution code:
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(":(")

Submission status: Wrong Answer

Solution code:
li =[int(input()) for i in range(6)]
isexist=True
for i in range(4):
    if li[i+1]-li[i]<li[5]:
        isexist=False

if isexist==False:
    print(":(")
else: print("Yay! ")

Submission status: Wrong Answer

Solution code:
an = []
for i in range(5):
    an.append(int(input()))
k=int(input())+1
if(an[4]-an[3]<k and an[3]-an[2]<k and an[2]-an[1]<k and an[1]-an[0]<k):
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
times = [int(input()) for _ in range(5)]
times1 = []
total = 0
for t in times:
  t1 = t % 10
  if t1 == 0:
    total += t
  else:
    times1.append(t1)
    total += (t//10 + 1) * 10
if len(times1) >= 1:
    total = total + min(times1) - 10
print(total)

Submission status: Wrong Answer

Solution code:

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

i = abs(e-a)

if i < k:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
a = []

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

f = True
for i  in range(4):
    for j in range(4-i):
        if a[j + i] - a[i] > a[5]:
            f = False
            break

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

Submission status: Wrong Answer

Solution code:

a=[]
for i in range(6):
    a.append(int(input()))
f=True
for i in range(3):
    for j in range(6-i):
        if a[5]<=abs(a[i]-a[j]):
            f=False
if f:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
import numpy as np

i = 0
nums = []

while i < 5:
  nums.append(int(input()))
  i += 1
  
k = int(input())

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

Submission status: Wrong Answer

Solution code:
import sys
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()
 
a = ni()
b = ni()
c = ni()
d = ni()
e = ni()
k = ni()
 
if b-a <= k and c-b <= k and d-c <= k and e-d <= k:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
X = [0]*6
for i in range(6):
    X[i] = int(input())
print(X)

for a in X:
    for b in X:
        if abs(a - b) > 15:
            print(":(")
            quit()

print("Yay!")

Submission status: Wrong Answer

Solution code:
list = []
list.append(input())
list.append(input())
list.append(input())
list.append(input())
list.append(input())

k = input()

ju = "Yay!"

for i in range(5):
    for j in range(5):
        if i == j:
            pass
        else:
            dis = abs(int(list[i]) - int(list[j]))
            print(dis)
            if dis > int(k):
                ju = ":("

print(ju)

Submission status: Wrong Answer

Solution code:
import numpy
import scipy

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

ends = False

for i in range(4):
    for j in range(i,5):
        if (p[j] - p[i] > k):
            print(':(')
            ends = True
            break

if not ends:
    print('Yay!')

Submission status: Wrong Answer

Solution code:
num_list=[int(input()) for i in range(5)]
k = int(input())
min_num, max_num = min(num_list),max(num_list)
print(["Yay!",":("][max_num - min_num >= k])

Submission status: Wrong Answer

Solution code:
s = [int(input()) for i in range(3)]
print('Yay!')

Submission status: Wrong Answer

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

for i in range(4):
    for j in range(4):
        if li[j] - li[i] > li[-1]:
            print(":(")
            quit()

print("Yay!")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

k = int(input())

ans = "Yey!"

for i in li:
    for j in li:
        if abs(i - j) > k:
            ans = ":("
            print(ans)
            quit()

print(ans)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 26 17:52:43 2019

@author: nakamuratakayuki
"""

atoe = []
for i in range(5):
    atoe.append(int(input()))
k = int(input())
ans = 'Yey!'
if atoe[4]-atoe[0] > k:
        ans = ':('
print(ans)

Submission status: Wrong Answer

Solution code:
def getResult(pos, K) :
    for i in range(len(pos)) :
        for j in range(len(pos)) :
            if abs(pos[i] - pos[j]) > K :
                return ":()"
    return "Yay!"

position = []
for i in range(5) :
    position.append(int(input()))
k = int(input())
print(getResult(position, k))

Submission status: Wrong Answer

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

ant=[a,b,c,d,e]
for i in range(5):
    for j in range(5):
        if abs(ant[i]-ant[j]) > k:
            print(":(")
print("Yay!")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
flag = -1
pos = [a, b, c, d, e]
for i in pos:
    for j in pos:
        if abs(i-j) > k:
            flag = 1
        else:
            pass

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

Submission status: Wrong Answer

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

a_b=abs(a-b)
a_c=abs(a-c)
a_d=abs(a-d)
a_e=abs(a-e)

b_c=abs(b-c)
b_d=abs(b-d)
b_e=abs(b-e)

c_d=abs(c-d)
c_e=abs(c-e)

d_e=abs(d-e)
if a_e > k:
    print(":(")
else:
    print("Yey!")

Submission status: Wrong Answer

Solution code:
a = []
for i in range(6):
  po = int(input())
  a.append(po)
           
flag = 0
for i in range(5):
  for j in range(5-i):
    sa = abs(a[i]-a[i+j])
    if sa > a[5]:
      print(":(")
      flag = 1
      break

if flag == 0:
  print("Yay!")

Submission status: Wrong Answer

Solution code:
a=int(input().strip())
b=int(input().strip())
c=int(input().strip())
d=int(input().strip())
e=int(input().strip())
k=int(input().strip())

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

Submission status: Wrong Answer

Solution code:
a = []

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

print (a[0])
f = True
for i  in range(4):
    for j in range(4-i):
        if a[j + i] - a[i] > a[5]:
            f = False
            break

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-


from sys import stdin



############################################


# read data for n sequences.
input=[]
for _ in range(6):
    input.append(int(stdin.readline().split()[0]))
k=input[5]

ant = input[0:5]

x=0
for a in input[0:4]:
    for b in input[1:5]:
        if b-a < k:
            continue
        else:
            x=1
            break

if x==0:
    print("Yay!")
else:
    print(":(")
#data = [int(stdin.readline().rstrip()) for _ in range(n)]

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys
 
 
a = int(sys.stdin.readline().strip())
b = int(sys.stdin.readline().strip())
c = int(sys.stdin.readline().strip())
d = int(sys.stdin.readline().strip())
e = int(sys.stdin.readline().strip())
k = int(sys.stdin.readline().strip())

print(k)
print(type(a))

l = [a,b,c,d,e]
l.sort(reverse=True)
print(l)


#flag = 1
#while(flag == 1):
if(l[0]-l[-1] > k):
    print(":(")
else:
    print("Yay!")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a_b=abs(a-b)
a_c=abs(a-c)
a_d=abs(a-d)
a_e=abs(a-e)

b_c=abs(b-c)
b_d=abs(b-d)
b_e=abs(b-e)

c_d=abs(c-d)
c_e=abs(c-e)

d_e=abs(d-e)
print(k)
print(a_e)

if a_e > k:
    print(":(")
else:
    print("Yey!")

Submission status: Wrong Answer

Solution code:
input_list = []
for i in range(5):
    input_list.append(int(input()))
print(input_list)

ans = 'Yay!'
if max(input_list) - min(input_list) > int(input()):
    ans = ':('

print(ans)

Submission status: Wrong Answer

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

l = [a,b,c,d,e]
l2 = sorted(l)

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

Submission status: Wrong Answer

Solution code:
temp = []

a = int(input())
temp.append(a)
b = int(input())
temp.append(b)
c = int(input())
temp.append(c)
d = int(input())
temp.append(d)
e = int(input())
temp.append(e)
k = int(input())
ans = 'Yay!'
for i in range(len(temp)):
    if i==len(temp)-1:
        break
    for j in range(len(temp)):
        if j==len(temp)-1:
            break       
        if i==j:
            continue
        if i>j:
            if temp[i]-temp[j]>k:
                ans = ':('
                break
        else:
            if temp[j]-temp[i]>k:
                ans = ':('
             

print(ans)

Submission status: Wrong Answer

Solution code:
from sys import stdin

def main():
    I = [int(input()) for _ in [0] * 6]

    if I[4] - I[0] > I[5]:
        print(':(')
    else:
        print('Yah!')

input = lambda: stdin.readline().rstrip()
main()

Submission status: Wrong Answer

Solution code:
A = [int(input()) for _ in range(6)]
ABC = A[:5]
K = A[5]
for i in range(4):
    if ABC[i + 1] - A[i] > K:
        print(':(')
        exit()
print('Yay!')

Submission status: Wrong Answer

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

for i in range(5):
  for j in range(i+1,5):
    tmp = lst[j] - lst[i]
    #print(tmp)
    if tmp >= k:
      break
  if tmp >= k:
    print(":(")
    break
else:
  print("Yay!")

Submission status: Wrong Answer

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

array = [a,b,c,d,e]
flag = True

for i in range(0, 4):
    for j in range(i+1, 5):
        print(i, j)
        if abs(array[i] - array[j] )> k:
            flag = False
            break
            
if flag:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
num = []

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

k = int(input())

ans = True

for i in range(1, 5) :
    for l in range(i + 1, 5) :
        if num[l] - num[i] > k :
            ans = False

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

Submission status: Wrong Answer

Solution code:
num_list=[int(input()) for i in range(5)]
k = int(input())
min_num, max_num = min(num_list),max(num_list)
print([":(","Yay!"][max_num - min_num >= k])

Submission status: Wrong Answer

Solution code:
"""
python3 main.py < input.txt
"""
a=int(input())
#a=(a//10 if a%10 == 0 else a//10 + 1)*10
b=int(input())
#b=(b//10 if b%10 == 0 else b//10 + 1)*10
c=int(input())
#b=(b//10 if b%10 == 0 else b//10 + 1)*10
d=int(input())
e=int(input())
k=int(input())
if e-a <= k:
    print('Yey!')
else:
    print(':(')

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
anntena_list = []

for i in range(5):
    anntena_list.append(int(input()))
    
m = int(input())
    
flag = False
for i in range(4):
    if anntena_list[i+1] - anntena_list[i]  > m:
      flag = True
      
if flag:
  print(':C')
else:
  print('Yay!')

Submission status: Wrong Answer

Solution code:
A = [int(input()) for _ in range(6)]
for i, l in enumerate(A[0:4]):
  for l2 in A[i:4]:
    if not (l2-l <= A[5]):
      print(':(')
      quit()
print('Yay!')

Submission status: Wrong Answer

Solution code:
import sys


def main():
    h = [int(input()) for count in range(6)]
    k = h[5]
    for i in range(len(h) - 2):
        for j in range(len(h) - 2):
            if abs(h[i] - h[j]) > k:
                print(":(")
                sys.exit()
    print("Yay!")


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = list()
a.append(int(input()))
a.append(int(input()))
a.append(int(input()))
a.append(int(input()))
a.append(int(input()))
k = int(input())

result = True
for i in range(len(a)):
    for j in range(i+1, len(a)):
        if a[j] - a[i] > k:
            print(':(')
print('Yay!')

Submission status: Wrong Answer

Solution code:
m_list = list()
for k in range(5):
    m = int(input())
    m_list.append(m)

count = 0
for i in range(len(m_list)):
    for j in range(len(m_list)):
        if m_list[i] - m_list[j] >= 15:
            count += 1

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

Submission status: Wrong Answer

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

ans = 0
for i in range(5):
    for j in range(i+1,5):
        print(a[i],a[j])
        if abs(a[i]-a[j]) <= k:
            ans += 1
if ans == 10:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


if any([abs(i)>k for i in [a-b,a-c,a-d,a-e,b-c,b-d,b-e,c-d,c-e,d-e]]):
    print(':(')
else:
    print('Yes!')

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
g=0
if b-a>k: #k以下の時通信可能
  g=1
if c-b>k:
  g=1
if d-c>k:
  g=1
if e-d>k:
  g=1

if g==0: #通信できる
  print("Yay!")
elif g==1:
  print(":(")

Submission status: Wrong Answer

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

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

for i in range(4):
    if longth[i] - longth[i+1] < k or longth[i] - longth[i+1] > -k:
        continue
    else:
        print(':(')
        break
else:
    print('Yay!')

Submission status: Wrong Answer

Solution code:
input_ha = []
for i in range(0,5):
    input_ha.append(int(input()))
max_in = max(input_ha)
min_in = min(input_ha)

k = int(input())

if((max_in - min_in) < k):
    print("Yay!")
else:
    print(':(')